Could not find Activity ID

#1

Hello Community

I have one special case which I cannot solve. I want to count cases which are going through one node of activities. It is fine, this I can handle, but formula shown in the screenshot is crashing when this node is not present in a workflow.
So, my question is, if there’s a way to catch this error and use this formula in both cases, when this ID is present and not present.

Thanks,
Szczepan

exclude

0 Likes

#2

Hi!

I think you can solve this when you use PU_COUNT instead of MATCH_ACTIVITIES. You could try something like this:

SUM ( CASE WHEN PU_COUNT ( “YOUR_CASE_TABLE”, “YOUR_ACTIVITY_TABLE”.“ACTIVITY”, “YOUR_ACTIVITY_TABLE”.“ACTIVITY” = ‘VIM Workflow starts’) > 0 THEN 0.0 ELSE 1.0 END)

The PU_COUNT will count the number of occurences of ‘VIM Workflow starts’ per case. If this count is larger than 0, the activity is contained at least once in the case. Since you don’t want to count those cases, the CASE WHEN neets to return 0 in that case, and 1 otherwise.

Just let me know if you have further questions!

Best regards
David

1 Like