Resources
- Text Mode in Filters Using EXISTS Mod – Examples of the EXISTS and NOTEXISTS text mode in filters.
- Workfront Help Article – Create Complex Text Mode Using EXISTS Statements
How To
This article explains how to use the EXISTS and NOTEXISTS filter rules to find records where specific values do or don’t exist. For example, a project report can be configured to find projects with no tasks, documents or issues. Or, a project report showing projects where a document does exist can be achieved. The following procedure explains how this is performed.
Some important fundamentals of this capability should first be reviewed and understood.
- EXISTS and NOTEXISTS – Choose accordingly…
- EXISTS = find records where something does exist
- NOTEXISTS = find records where something doesn’t exist
- Multiple Filter Rules (AND) – Begin with :a for the first set of rules. To add additional (AND) exists rules to the filter, use:
- EXISTS:a
- EXISTS:b
- EXISTS:c
- EXISTS:d
- etc.
- Object Codes – the $$OBJCODE is required when using EXISTS. To find object codes, open the Workfront API Explorer, search for the object of interest. The object code is on the right.
Procedure
Step 1: Define the requirements of the filter rules using pseudo code. For example,
In a project report, show projects
Without
Tasks
On the Project
Named “Test”
Step 2: Translate the pseudo code into text mode. For example,
In a project report, show projects
Without EXISTS:a:$$EXISTSMOD=NOTEXISTS
Tasks EXISTS:a:$$OBJCODE=TASK
On the Project EXISTS:a:projectID=FIELD:ID
Named “test” EXISTS:a:name=test
Step 3: Remove the pseudo code and enter filter in the report’s text mode.
EXISTS:a:$$EXISTSMOD=NOTEXISTS EXISTS:a:$$OBJCODE=TASK EXISTS:a:projectID=FIELD:ID EXISTS:a:name=test
Step 4: Check out some examples of EXISTS and NOTEXISTS text mode.