Creating a Workflow Query

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.

  1. We drag and drop a Condition step onto the workflow.

  2. 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.)

  3. 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.

  4. 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.

  5. In this example, we choose exists for the file that matches the following condition.

  6. 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:

  7. 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.

  8. 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: