Table header filter with multiple values

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
rob59m
User
Posts: 3

Table header filter with multiple values

Post by rob59m »

Hello,

I have a project now in v2024.8, but the behaviour was the same also in v2024 previous versions.

I'm using the table header filter on some reports (tick on "Filter" in the "Report Page" tab) to enable the Excel type filter on some columns (all this colums are text type fields).
With a click on the filter icon in the table header of a column I'm able to select one or more values to filter the contents of the report.
Selecting only one value (i.e. "VALUE1") everything is working fine (only the rows containing "VALUE1" in that column are displayed).
Selecting two or more values (i.e. "VALUE1" and "VALUE2") I'm expecting to view all the rows containing "VALUE1" or "VALUE2", but no row is found.

I activated the debug and I see that 2 SELECT statements are generated, one for COUNT and the other to get the rows, but the WHERE clause in both SELECTs is coded as follows:

SELECT * FROM my_view WHERE `column1' IS NULL AND `column_to_filter_on` = 'VALUE1,VALUE2'

As you can see, the selected values to filter are listed in a comma separated list, but in this case I expect that the "=" operator should be replaced by an "IN" operator, because a statement like this obviously can't return any row...
Am I the only user with a problem like this?


Webmaster
User
Posts: 9427

Post by Webmaster »

Please update to the latest template (Tools -> Update Template) and try again.


rob59
User
Posts: 1

Post by rob59 »

Ok, updated template, now working!
Thanks!


Post Reply