Complex Filter - Filter out two different check on same field in multiple OR statements | Community
Skip to main content
LaurensKr1
October 3, 2025
Solved

Complex Filter - Filter out two different check on same field in multiple OR statements

  • October 3, 2025
  • 1 reply
  • 274 views

Hi,

 

I have a report with 3 level of OR statements. Example below.

Field1_Mod=isnull

name=Task 1

name_Mod=cicontains

OR:1:Field1_Mod=isnull

OR:1:name=Task 2

OR:1:name_Mod=cicontains

OR:2:Field1_Mod=isnull

OR:2:name=Task 3

OR:2:name_Mod=cicontains

 

But on Field 1, I want to do an additional check to exclude the task if FIeld 1 contains 0 in it. 

 

So I modified the code as below:

Field1_Mod=isnull
AND:1:Field1_Mod=cinotcontains

AND:1:Field 1_=0

name=Task 1

name_Mod=cicontains

OR:1:Field1_Mod=isnull

OR:1:name=Task 2

OR:1:name_Mod=cicontains

OR:2:Field1_Mod=isnull

OR:2:name=Task 3

OR:2:name_Mod=cicontains

 

The code works find for Task 1, but I want to apply the same logic for Task 2 and Task 3. 

 

I am not sure how to write the same AND:1: code but for OR:1 and OR:2.

 

Is that even possible?

 

Best answer by skyehansen

somewhat similar -- except that you need the ":1" in front of ALL the ANDs, just like it is in your first set. And your field name needs to be consistent... whatever it is.


(I should have said "to the right" of all the ANDs, but hopefully you got my drift!)

1 reply

skyehansen
Community Advisor
Community Advisor
October 4, 2025

if you got task1 working, you should be able to do the same for task2 and 3. Just think of it as creating three different sets of filters, and just adding the "OR:__:" part to the front of each filter set.

LaurensKr1
October 7, 2025

Hi Skye, always good to hear from you. And for some reason I missed the reply. 

 

Are you saying something like this?

 

Field1_Mod=isnull
AND:1:Field1_Mod=cinotcontains

AND:1:Field 1_=0

name=Task 1

name_Mod=cicontains

OR:1:Field1_Mod=isnull

OR:1:name=Task 2

OR:1:name_Mod=cicontains

OR:1:AND:Field=0

OR:1:AND:1:Field1_Mod=cinotcontains

OR:2:Field1_Mod=isnull

OR:2:name=Task 3

OR:2:name_Mod=cicontains

OR:2:AND:Field=0

OR:2:AND:1:Field1_Mod=cinotcontains

skyehansen
Community Advisor
skyehansenCommunity AdvisorAccepted solution
Community Advisor
October 7, 2025

somewhat similar -- except that you need the ":1" in front of ALL the ANDs, just like it is in your first set. And your field name needs to be consistent... whatever it is.


(I should have said "to the right" of all the ANDs, but hopefully you got my drift!)