Okay
  Public Ticket #3183085
Capability of wpDataTables
Closed

Comments

  • Lisa started the conversation

    I would like to create a table (or view) based on Gravity Forms or excel or google sheets - can wpDataTables do this? for example:

    create table patient-score as

    select patient_name, sum(total_score) as total-score

    from patient-application

    group by patient_name;


  •  1,846
    Miloš replied

    Hi, Lisa 

    Thanks for reaching out to us

    -

    1. In regards to pulling the data from Gravity Forms in form of SQL Queries from the database,

    this can only be done with a very complex custom SQL Query, with MySQL query-based tables.

    Please note: Using this plugin feature requires at least a basic knowledge of SQL. It is assumed that you can create the table in some MySQL data manager (e.g., PHPMyAdmin, MySQL Workbench), and prepare a SQL query that will return the data you need. 

    A good way to achieve this can be experimenting using our WPDB SQL Query Constructor tool.

    - Please note: this tool is not an ultimate query generator. It simply constructs a suggestion of a query. We are constantly working to improve it, but SQL is such a complicated and flexible language that full automation for constructing queries is next to impossible. 

    Consequently, the more complicated the query, the higher is the probability that it will not return exactly what you need. So, you will often need to play around with the resulting query.

    Please be advised that writing custom SQL Queries or debugging Queries does not fall under what our support covers.

    You can check out this official page of WP codex,  for help with writing custom Queries.

    -

     But there is an easier way, without the need for SQL Query.

    We have a premium add-on as native integration with Gravity Forms,

    so if you just wish to pull the fields from the Form,  you can do that,

     and you will also be able to add a calculation to tables for any column ( SUM, Average, min, Max  - more on Calculation functions with our plugin here);

    You will also be able to sort/filter it, etc.  ( more about filtering here)

    - Tables connected with the integration can also be made editable if you enable server-side processing on the table linked to a Form.

    Please check more about our premium add-on Gravity Forms integration here.

    Before purchase you can test all plugin and Add-on features on our sandbox site.

    And i just wanted to point out that you can try wpDataTables before purchasing

     on our sandbox Demo sites ( you can find links for the main plugin Demo,  

    as well as add-on Demos, in my signature),

    and there is a 15-day money-back guarantee period, 

    so if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)

    -

    2. 

    In terms of using Excel data with our plugin, there are two ways to create wpDataTables:

    1.  Create a table linked to an existing Excel file,

    if you choose to Create a wpDataTable and upload the Excel file :

     in which case you get to select the file (upload it) that'll be used to pull the data.

     This file will be stored in ../wp-content/uploads/YEAR/MONTH/ folder. 

    The file on that location can be changed/edited, but the column structure can't. 

    So, if you have the file with the same name,

     the same number of columns, same headers, and the same order of columns - you'd be able to replace the original file with the new file, and wpDataTables would pick that up.

    -

    Alternatively, if you select "URL from any domain"

    5896577008.png

    Creating a table linked to an Excel file by providing its URL is pretty much the same as it is for creating a table by uploading an Excel file. 

    The only difference is that you would choose the URL from any domain option instead of the WordPress Media Library option under File location when creating the table,

    and when you want to edit the source file,   you don't have to edit the one that is now in your Media Library folder,

    but you can edit on the original source file.

    2. 

    Or If you import the file, the plugin reads the source file and creates a manual table

    Once the table is created, it is no longer linked to the source file, so changing data in the table will not show up in Excel or Google Spreadsheet, and vice-versa. 

    To modify this table, you can either switch to the Excel-like view

    and then select and copy the range of cells you want to paste from the source file, and paste it in the Excel-like view, 

    or you can import a new/edited CSV to update the table, as well, in the following ways :

    • Replace data within an existing table.
    • Add data to an existing table.
    •   Replace the entire table with new data.

    You can see more details on Updating manual tables from source files (CSV, Excel or Google sheet) here.

    3. For using Google sheets with our plugin,

    There are two ways how you can use Google Sheets data in our plugin ;

    1. Link the table to Google Spreadsheets, 

    when you modify or add new rows on the source sheet,

     the plugin will show those changes within 15 minutes (since there's cache on Google's side). More details here

    If you don't want to face any issues with cache, you can use the Google Sheets API method. ( more details here-)

    - Additionaly, if you use Google API linked tables, we have a very useful feature for auto-updating of cache.

    - Important to note, tables linked to source data will not be ediable from the plugin side,  you can just edit the source sheet.

    -

    2. You can also import data from Google Spreadsheets, the same way as i explained for Excel.

    -

    If you need "Row Grouping",  please check this feature - it is only available for tables that don't have server-side processing enabled.

    Let me know how all that seems, and if you have any questionssmile.png

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables