I can't remember, but I'm pretty sure we used to be able to sort and filter a table via shortcode, but I can't seem to find that documentation anymore.
User Story:
I have a table that contains deadlines for advertising publications that my company runs in. I have a sales/information page for each of these specific publications, and am wanting to include the master data table that I have set up on these pages, but pre-sort the table to only show the user the publication that the current page is on.
Is it possible to pre-filter a table, so that it could be appear on different pages with different pre-filters? Example similar to Alex's question, if there were a listing of key resources in the table, could the table be displayed on 3 different pages, say with one page prefiltered for IoT resources, another prefiltered for Big Data resource, and the 3rd Cloud resources?
You can add a variable placeholder as a predefined filtering value to a column, and then change it through the shortcode.
For example, if you add %VAR1% as a predefined filtering value to column1, you can use [wpdatatable id=1 var1='loT'] on one page, [wpdatatable id=1 var1='Big Data'] on another, and [wpdatatable id=1 var1='Cloud'] on the third page.
Aleksandar - Thank you very much for the prompt reply in simple "How to" instructions! I may have further questions down the line, but am still looking through your online materials first. - Thanks again & Have a great day! Peter
are the variable placeholders you highlighted below only for MySQL tables?
are table relations/connections also only possible for MySQL tables? (e.g. - have a customers table, and orders table, so you don't repeat all of the customer info for every order)
Placeholders are included in all wpDataTables except for Simple Tables, and they can be used as predefined filtering options for columns. For example, if you add %VAR1% as a predefined filtering option on a certain column, you can modify it through the shortcode, so [wpdatatable id1= var1=test] is shown on one page, and [wpdatatable id=1 var1=test2] is shown on another page.
For table relations, you can try linking data using Foreign Keys.
Aleksandar - Thank you again, and it is great to know the placeholders work for other tables (except Simple)!
Regarding the Foreign Keys, do they only work with MySQL tables, or do they work with other types of tables too?
I should have asked my question specifically around Foreign Keys (vs relations/connections), as I read that material before, and my question arose as the example used was MySQL.
Foreign keys also work with all table types except for Simple tables.
They work best if you have an integer column with predefined values (1, 2, 3, 4...). Then, when you connect the column to another table, you get to choose the store value, and the display value.
If you have these numbers predefined, the "store value" from another table will automatically recognize them, and replace them with the displayed value. You can try out the example on our documentation, to see first-hand how they work.
I can't remember, but I'm pretty sure we used to be able to sort and filter a table via shortcode, but I can't seem to find that documentation anymore.
User Story:
I have a table that contains deadlines for advertising publications that my company runs in. I have a sales/information page for each of these specific publications, and am wanting to include the master data table that I have set up on these pages, but pre-sort the table to only show the user the publication that the current page is on.
When viewing the advertising homepage, all publication deadlines will appear.
When viewing the Park Record Real Estate Monthly page, the table is pre-filtered to only show deadlines for the Park Record Real Estate Monthly.
Hello Alex
Thank you for your purchase.
Unfortunately there's no way (there never was a way) to sort the table through a shortcode.
You can choose a column which will be used as a default sorting column for the table, through that column's settings.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Aleksandar,
Is it possible to pre-filter a table, so that it could be appear on different pages with different pre-filters? Example similar to Alex's question, if there were a listing of key resources in the table, could the table be displayed on 3 different pages, say with one page prefiltered for IoT resources, another prefiltered for Big Data resource, and the 3rd Cloud resources?
Thanks in advance!
Peter
Hello Peter
You can add a variable placeholder as a predefined filtering value to a column, and then change it through the shortcode.
For example, if you add %VAR1% as a predefined filtering value to column1, you can use [wpdatatable id=1 var1='loT'] on one page, [wpdatatable id=1 var1='Big Data'] on another, and [wpdatatable id=1 var1='Cloud'] on the third page.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Aleksandar - Thank you very much for the prompt reply in simple "How to" instructions! I may have further questions down the line, but am still looking through your online materials first. - Thanks again & Have a great day! Peter
You're welcome, Peter
Glad I could be of assistance.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
A quick follow up
Thanks again!
Hello Peter
Placeholders are included in all wpDataTables except for Simple Tables, and they can be used as predefined filtering options for columns. For example, if you add %VAR1% as a predefined filtering option on a certain column, you can modify it through the shortcode, so [wpdatatable id1= var1=test] is shown on one page, and [wpdatatable id=1 var1=test2] is shown on another page.
For table relations, you can try linking data using Foreign Keys.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Aleksandar - Thank you again, and it is great to know the placeholders work for other tables (except Simple)!
Regarding the Foreign Keys, do they only work with MySQL tables, or do they work with other types of tables too?
I should have asked my question specifically around Foreign Keys (vs relations/connections), as I read that material before, and my question arose as the example used was MySQL.
Thanks again!!
You're welcome, Peter
Foreign keys also work with all table types except for Simple tables.
They work best if you have an integer column with predefined values (1, 2, 3, 4...). Then, when you connect the column to another table, you get to choose the store value, and the display value.
If you have these numbers predefined, the "store value" from another table will automatically recognize them, and replace them with the displayed value. You can try out the example on our documentation, to see first-hand how they work.
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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