Expand my Community achievements bar.

SOLVED

Or statement with EXISTS

Avatar

Level 2

 

I have seen a few posts that are pretty close to what I want, but for some reason not working and I think I'm missing something.

 

I want to filter a list of documents to show all documents that are in a folder called "Final" (not case sensitive)

OR

are not in a folder at all.

 

In my org, people usually save drafts in folders called working or drafts. Some are really good about putting finals in a folder called finals while others leave the finals in no folder (just the top leave in the project or issue). I have tried a few variations, and the below pieces work separately, but not together (i.e. I can get the list to filter and show docs where there is NO filder OR docs where the folder is called final, but not both.)

 

Version 1:

 

EXISTS:1:$$OBJCODE=DOCFLD
EXISTS:1:documentID=FIELD:ID
EXISTS:1:folder:name=final
EXISTS:1:folder:name_Mod=contains
OR:1:EXISTS:1:$$OBJCODE=DOCFLD
OR:1:EXISTS:1:documentID=FIELD:ID
OR:1:EXISTS:1:folder:name_Mod=blank

 

 

Version 2:

EXISTS:1:$$OBJCODE=DOCFLD
EXISTS:1:documentID=FIELD:ID
EXISTS:1:folder:name=final
EXISTS:1:folder:name_Mod=contains
EXISTS:2:$$OBJCODE=DOCFLD

EXISTS:2:documentID=FIELD:ID
EXISTS:2:folder:name_Mod=blank

 

 

Version 3:

EXISTS:1:$$EXISTSMOD=EXISTS
EXISTS:1:$$OBJCODE=DOCFLD
EXISTS:1:documentID=FIELD:ID
EXISTS:1:folder:name=Final
EXISTS:1:folder:name_Mod=contains

EXISTS:2:$$EXISTSMOD=NOTEXISTS
EXISTS:2:$$OBJCODE=DOCFLD
EXISTS:2:documentID=FIELD:ID

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hey,

 

Give the following a go and let me know if this works

 

EXISTS:1:$$EXISTSMOD=NOTEXISTS
EXISTS:1:$$OBJCODE=DOCFLD
EXISTS:1:documentID=FIELD:ID
OR:1:EXISTS:a:$$EXISTSMOD=EXISTS
OR:1:EXISTS:a:$$OBJCODE=DOCFLD
OR:1:EXISTS:a:documentID=FIELD:ID
OR:1:EXISTS:a:folder:name=final
OR:1:EXISTS:a:folder:name_Mod=cicontains

 

Best Regards,

Rich

 

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hey,

 

Give the following a go and let me know if this works

 

EXISTS:1:$$EXISTSMOD=NOTEXISTS
EXISTS:1:$$OBJCODE=DOCFLD
EXISTS:1:documentID=FIELD:ID
OR:1:EXISTS:a:$$EXISTSMOD=EXISTS
OR:1:EXISTS:a:$$OBJCODE=DOCFLD
OR:1:EXISTS:a:documentID=FIELD:ID
OR:1:EXISTS:a:folder:name=final
OR:1:EXISTS:a:folder:name_Mod=cicontains

 

Best Regards,

Rich

 

Avatar

Level 2

You are an officer and a gentleman, thank you! It worked!