Or statement with EXISTS | Community
Skip to main content
ElizaBarryGuild
August 30, 2024
Solved

Or statement with EXISTS

  • August 30, 2024
  • 1 reply
  • 720 views

 

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Richard_Le_

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

 

1 reply

Richard_Le_Community AdvisorAccepted solution
Community Advisor
September 3, 2024

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

 

ElizaBarryGuild
September 4, 2024

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