VOI
Member
Hi,
I set up a list with a pre-filter using the IN condition on a dropdown element (lets call it 'status') to filter for multiple values and to avoid using multiple filter conditions nested with OR.
This element is shown in the list and its "Filter type" is set to "dropdown".
If the user tries to filter the list using this dropdown filter (e.g. for the value 'doi1'), a page with an SQL error is displayed.
I believe the reason for this error is the WHERE part created from the user filter:
There should be single quotes around the value selected by the user - right?
My current workaround is to use nested OR filters with EQUALS condition for the list pre-filter instead of the IN Condition. In this case the WHERE statement based on the user filter does not use the IN condition, but the LIKE syntax as follows:
However, I would be glad if I could use the IN condition for pre-filters again.
Chris
I set up a list with a pre-filter using the IN condition on a dropdown element (lets call it 'status') to filter for multiple values and to avoid using multiple filter conditions nested with OR.
This element is shown in the list and its "Filter type" is set to "dropdown".
If the user tries to filter the list using this dropdown filter (e.g. for the value 'doi1'), a page with an SQL error is displayed.
I believe the reason for this error is the WHERE part created from the user filter:
Code:
AND (`projects`.`status` IN (doi1))
There should be single quotes around the value selected by the user - right?
My current workaround is to use nested OR filters with EQUALS condition for the list pre-filter instead of the IN Condition. In this case the WHERE statement based on the user filter does not use the IN condition, but the LIKE syntax as follows:
Code:
AND (`projects`.`status` = 'doi1' OR `projects`.`status` LIKE '[\"doi1\"%' OR `projects`.`status` LIKE '%\"doi1\"%' OR `projects`.`status` LIKE '%\"doi1\"]')
However, I would be glad if I could use the IN condition for pre-filters again.
Chris