When you add a condition to a workflow, you are prompted to enter the query for determining if the condition is true or false. Some common queries entered include:
- Is the file greater than a specific size?
- Is a value above a specific dollar amount?
- Is the user who performed the action an External (or Guest or Full) user?
To create a query for a condition:
In the following example, we'll create a query that checks if an uploaded invoice file is for an amount greater than $500, and if it is, we'll send it for approval. Following the step by step procedure is a video that shows you the complete process at once.
- We drag and drop a Condition step onto the workflow.
- Then, we click Add in the right panel to add a query using the query builder. (Alternately, we could have clicked Text Editor (Advanced) to enter the query freehand.)
- New Rule adds a one-rule condition. New Rule Group creates a multiple-rule condition.
In this example, we choose New Rule.
The query builder opens.
In the first drop-down list in the query builder, we choose the part of the workflow that the query is evaluating.
The options vary depending on the workflow trigger initially chosen.
For a list with definitions of the available workflow query options, see Workflow Query Options.
In this example, we choose Metadata.
The next drop-down list in the query builder includes conditions that vary depending on the option chosen.
For a list with definitions of of the available query conditions for each option, see Workflow Query Conditions.
In this example, we choose exists for the file that matches the following condition.
The condition can be set to True or False. Here, we leave it at True.
The query editor indicates the format for the final part of the query. In this case it is metadata, operator, value:
We enter invoice.amt,>,500 and click Save.
The condition is complete. Now, we can add a workflow step that occurs either when the condition is found true or when it is found false, or both.
We add a step to wait for approval if the condition that the invoice amount is > 500 is true.
The following video shows the same query being created: