We're Moving to a New Support Platform – Starting June 1st!
We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.
You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.
While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.
We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.
Thanks for your continued support and trust – we’re excited to bring you an even better support experience!
PLEASE NOTE: I was disallowed uploading more than 4 images to the ticket. So I have uploaded them elsewhere and reference them by link in the problem description.
Table Description
Problem Description
Investigation Steps
Hi Miloš ,
Thanks for your reply I replied to in the private issue over a month ago but didn't hear from you since. So here it is in the public ticket:
Just to be clear, we are not attempting to populate the filter list via the VAR values as you say here: "The VAR placeholders can be used for dynamic filtering - but you can not place them as possible dynamic values for a dropdown filter." Likewise, this presumption is incorrect: "I presume you tried to place a full list of all possible values here, then the expected behaviour was for those to appear as possible values in a filter." We are in fact doing what you state here: "SELECT * FROM yourDatabaseTable WHERE columnName = '%VAR1%' Then, the default filtered value is the one you set in the VAR1 Placeholder setting on Back-end." We use the VAR1 value and VAR2 value in our SQL query to populate the data table. The comma separated list is used in a rather lengthy query we have, which I have left the beginning out of for brevity. Here is our WHERE clause for this query: ``` <REST OF OUR QUERY HERE> ....
WHERE %WPDB%phonicscore_practicebird_practice_sessions.`owner_id` IN ( %VAR1% ) AND %WPDB%phonicscore_practicebird_practices.`music_piece_id` IN ( %VAR2% )
```
This yields the data in the table correctly that we desire (we are able to use the comma separated list in this way and it works as expected). It yields the correct different data that we desire based on the values in those VAR's.
The actual problem we are experiencing is that it appears that the filter values are not dynamically populated based on the data in the table currently being displayed. The values are always populated based on the result of the query that occurs with our "test" placeholder values that must be entered in the admin editor section of the table. Please correct me if I am wrong here, but it appears your statement here:
"The only way to define which filter values are possible for a dropdown filter can be manually set in the Column settings/data tab."
Indicates that the filter options are not populated based on the current data in the table, but must always be predefined in some way (either manually, or as we are experiencing, with the initial table data from the table edit screen values).
Is this correct? If so, is there a recommended way to accomplish populating the filter values with the data from the current data in the table (which is itself populated via a SQL query containing placeholder VAR's)?
Perhaps, based on your example given here:
"
If we want page 1 for example only filtered for "Region A" , you can set predefined filter to this column as %VAR1% (filter type has to be set as text) :
Then for a page where we need only Region 1 filtered, use shortcode [wpdatatable id=1 var1='Region A'] ,"
Could we define var1 as a comma separated list of values possibly? I may be able to work around with this.
Thanks again for your time.
-Thomas