I'm enthusiast about the wpDataTable plugin. Meanwhile I was experimenting here and there thanks to your online documentation a problem has arised. I have a table in wich multiple values (from a given list) are allowed for a single column-row.
With regard to the image attached I would like to be able to filter the table, for example focusing on Place column:
- choosing attributes X: will provide as resultset (1st_item, 3rd_item)
- choosing attribute X, Z: should provide only 1st_item as resultset.
I'm aware that the and/or conditions are availble, but it looks to me that this is possible multiple fields (columns) and not for multiple attibutes in a field (column).
In terms of SQL I would need this kind of behaviour:
SELECT * FROM TableName WHERE Place LIKE 'X%' OR Place LIKE 'Z%'
But again, the number of "LIKE" conditions will depend on how many items (X, Y, Z, K, H, etc.) are chosen from the filtering options. A kind of faceted/OLAP filtering.
Could you provide me some clue or link to documentation on how to manage this use-case?
If I understand you correctly this can be achieved in two ways depending on how you want to configure the filter as String or Selectbox.
If the filtering type is string when you type in the desired value it will automatically pull all cells that contain that word in them, if exact filtering is turned off.
If you want to set the filtering type to selectbox you will need to add individual values as manually defined values so when you select one of the countries all cells where this value is mentioned will be pulled.
Again please make sure exact filtering is turned off.
You can use SQL as well but please note we do not provide support for writing custom queries and you would need to create a view if you would like to use a complicated query in order for the filtering to work properly.
I hope this helps, do let us know if you need any further assistance.
Thanks a lot Blaženka, I will try to implement it by tomorrow and I'll let you know if I have been able to succeed, otherwise I will try to explain where I'm stuck.
Hello again Blaženka. This is a more precise explanation of the gooal and the issue.
I created a simple table; 2 columns (one string line and multi-line selectbox) - image01 and image02
I created two records; item01 is characterised by attribute X and Y while item02 by attributes X, Y and Z - image04
PROBLEM: when I try to filter for attribute X and Z only item01 is found/selected meanwhile also item02 has the X an Z attibutes (more precisely has: X, Y, Z) but it is not beeing selected - image05. Anyway under the logic of my data, I would need to get all the items/records that have X OR Z attribute (so, item01 and item02).
I hope this helps for finding a solution. Kind regards and thanks again.
I can see you are using global search to filter the results in that way, unfortunately this can only be achieved using the column's filter and a checkbox/selectbox filter type. You can remove filtering for all other columns including the global search, and place the one remaining filter above the table.
Dear Sir or Madam,
I'm enthusiast about the wpDataTable plugin. Meanwhile I was experimenting here and there thanks to your online documentation a problem has arised. I have a table in wich multiple values (from a given list) are allowed for a single column-row.
With regard to the image attached I would like to be able to filter the table, for example focusing on Place column:
- choosing attributes X: will provide as resultset (1st_item, 3rd_item)
- choosing attribute X, Z: should provide only 1st_item as resultset.
I'm aware that the and/or conditions are availble, but it looks to me that this is possible multiple fields (columns) and not for multiple attibutes in a field (column).
In terms of SQL I would need this kind of behaviour:
SELECT * FROM TableName
WHERE Place LIKE 'X%' OR Place LIKE 'Z%'
But again, the number of "LIKE" conditions will depend on how many items (X, Y, Z, K, H, etc.) are chosen from the filtering options. A kind of faceted/OLAP filtering.
Could you provide me some clue or link to documentation on how to manage this use-case?
Kind regards,
Carmelo Caruso
Hi Carmelo
Thank you for reaching out to us.
If I understand you correctly this can be achieved in two ways depending on how you want to configure the filter as String or Selectbox.
If the filtering type is string when you type in the desired value it will automatically pull all cells that contain that word in them, if exact filtering is turned off.
If you want to set the filtering type to selectbox you will need to add individual values as manually defined values so when you select one of the countries all cells where this value is mentioned will be pulled.
Again please make sure exact filtering is turned off.
You can use SQL as well but please note we do not provide support for writing custom queries and you would need to create a view if you would like to use a complicated query in order for the filtering to work properly.
I hope this helps, do let us know if you need any further assistance.
Thanks a lot Blaženka, I will try to implement it by tomorrow and I'll let you know if I have been able to succeed, otherwise I will try to explain where I'm stuck.
Kind regards,
Carmelo
Hello again Blaženka. This is a more precise explanation of the gooal and the issue.
I hope this helps for finding a solution. Kind regards and thanks again.
Carmelo Caruso
PS
These are the settings on the attributes column (image06).
Hi Carmelo
I can see you are using global search to filter the results in that way, unfortunately this can only be achieved using the column's filter and a checkbox/selectbox filter type. You can remove filtering for all other columns including the global search, and place the one remaining filter above the table.
Hi, thanks again. I will try to implement and test it immediately.
You are most welcome
If there is anything else we can assist you with please don't hesitate to open a new ticket.
Have a wonderful day!
Solved! Thanks!!
Attached are the screenshots of:
- Column properties;
- Column filter properties;
- Frontend result (checkbox filter)
That's great, thank you for the update