Expand my Community achievements bar.

SOLVED

Report Filter: Contains and Does Not Contain on the same field

Avatar

Level 10

Hi WF Community,

 

I'm trying to create multiple filters in a report, filtering on the same field (Program Name).

- I want results where the Program Name contains "AXP371"

**AND**

- I want results where the Program Name does not contain "enl"

Screenshot 2024-06-11 at 2.06.59 PM.png

 

When I do this, whether in the standard interface or using text mode, the system strips out one of the Program Name filters.  Does anyone know if it's possible to create a report with this filtering?

 

Thanks!
Nick

1 Accepted Solution

Avatar

Correct answer by
Level 9

Hello Nick,

 

you are right, using the UI one of the filters seems to be ignored, but using text mode with AND:1: works, if I do not miss anything:

name=AXP371
name_Mod=cicontains
AND:1:name=enl
AND:1:name_Mod=notcontains

 

 

Regards

Lars

View solution in original post

4 Replies

Avatar

Correct answer by
Level 9

Hello Nick,

 

you are right, using the UI one of the filters seems to be ignored, but using text mode with AND:1: works, if I do not miss anything:

name=AXP371
name_Mod=cicontains
AND:1:name=enl
AND:1:name_Mod=notcontains

 

 

Regards

Lars

Avatar

Level 10

Nice, that worked, thanks Lars!

Can I add an OR in that text mode so the whole query solves for the following:


This is the first part you helped me solve for already...

- I want results where the Program Name contains "AXP371"

**AND**

- I want results where the Program Name does not contain "enl"

 

This is the second part I want to add as an OR (in addition to the above)...

**OR**

- I want results where the Program Name contains "AXP371"

**AND**

- I want results where the Program Name does not contain "early engagement"

Avatar

Level 9

Hello,

 

without having it tested in detail, this could work:

 

name=AXP371
name_Mod=cicontains
AND:1:name=enl
AND:1:name_Mod=notcontains
OR:2:name=AXP371
OR:2:name_Mod=cicontains
AND:2:name=early engagement
AND:2:name_Mod=notcontains

 

Regards

Lars

 

Avatar

Level 10

Thanks, Lars.  No luck so far with that 2nd one, but looking into it.