Okay
  Public Ticket #2704032
logic type functions
Closed

Comments

  •  2
    chrisburr started the conversation
    1.  Is it possible to populate a WP Datatable from a source such as an Excel spread sheet , such that an update of the Excel Spreadsheet would update the WP Datatable automatically?  If so how? ( where does excel sheet need to be strored?) If not, can it be done with an alternatives source such as say GoogleSheet?
    2. I am using WP Datatables on  a WP Multisite. Can I source content for one particular column in a WP Datatable “X” on one particular subsite “A” from a WP Datatable ”Y”on a different subsite “B”?  If so how can this be done?
    3. Is there a way of building conditional logic into a table.  Example,  for a given row, if Col A = “X” then Col B = “Y”?  If so how?
    4. Is there a way in WPDatatables to set up a WPDatatable to source information from another table in a similar way that you can use the VLOOKUP function in Excel to return a value from another table/sheet?  For example, in a given WPDatatable “1” you have a value”X” in col A of a given row.  For Col B of that table 1 ,same row, you have a function to look for “X” in a second WPDatatable of values “2” and return the corresponding value from a specified coulumn, say, Colum C of that table 2?  If so how? 

     

     

     

  •  2,507
    Aleksandar replied

    Hello Chris

    1. There are only 2 ways of using Excel (CSV and Google Spreadsheets) directly:

    • Create a table linked to an existing data source - the table is uploaded to ../wp-content/uploads/ folder, but the table created from it can't be edited. The file in that folder can be updated, but it's structure can't be changed (meaning if you add, remove, rename or reorder columns in the source file - it will break the table).
    • Create a table by importing an existing data source - in which case the file is read, and imported in the database - so that creates a manual table, which is no longer connected to the source file.

    So, you cannot use the spreadsheet which will update the table automatically, only using the first option in which case, the wpDataTable will not be editable.

    2. If they share the same database - yes, using SQL queries. If they don't share the same database, you can use Separate DB Connection in wpDataTables settings, and then use the data from the sub-site's database, to create an SQL query, but the data in this case, can't be combined - you can't combine data from multiple databases.

    3. I am sorry to disappoint you, but unfortunately something like this is not possible with the plugin's built-in features. Conditional formatting works only for a single column, based on data in that column.

    4. Something similar (but not the same) can be done using foreign keys.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    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