Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello, I have two tables: users and networkcut.
I want to count how many items in users match with the selected networkcut id.
If I don't select any networkcut item it should return 0 (otherwise it would be a too big calculation); so my code is:
IF(GetSelectedCount(netcut_name)=0, 0,
COUNT(distinct IF(WildMatch(user_hierarchy, '*'&netcut_id&'*')=1, user_id))
)
But still, if I don't select any network item, it still processes everything before returning 0 (and since it is too big, it returns an error).
Nope, still the same problem
But I don't understand what is the problem with the Set Expression
IF(GetSelectedCount(netcut_name)=1,
Count(DISTINCT {<user_hierarchy = {"$(='*' & netcut_id & '*' )"}>} user_id),
0
)
Because apparently it looks like it works