My goal is to create a filter which, after clicking, will only show cases which contain specific activity in them. In my case I want to include all cases which do contain activity with string ‘reject’ in the name of activity.
I’m trying to create a filter with this expression:
How can I create and apply a filter to show only all cases which do have such activity?
Page 1 / 1
LIKE is used to compare strings, not process patterns.
try to use the following PQL
FILTER COUNT_TABLE( CASE WHEN LOWER("ACTIVITY") LIKE '%reject%' THEN "CASE_ID" END ) > 0
Hi @Rami Agha Kassab,
Thank you for your answer. When I type in this PQL query I get an error:
If activity is the table name and activities is the column name, you should only use the column name in PQL (no table prefix). FILTER COUNT_TABLE( CASE WHEN LOWER("ACTIVITIES") LIKE '%reject%' THEN "CASE_ID" END ) > 0
Hi Rami,
Unfortunately, I still get this error even when I use only column name. I managed to achieve my desired result with this PQL formula:
FILTER PU_COUNT("CASES", "_CEL_MERGED_ACTIVITIES"."ACTIVITY", "_CEL_MERGED_ACTIVITIES"."ACTIVITY" LIKE '%reject%') > 0;
The problem now is that, when I try to create reverse filter (only include cases that do not contain ‘reject’ string in activity name) I do get all cases and only activities are filtered out. For example when I add ‘NOT LIKE’ in PQL statement - all cases remain, but in case details, these activities are filtered out from the views.