Skip to main content
The Criteria Builder

The Criteria builder allows you to set up a question or a condition which will compare one value to another value.

Updated over 10 months ago

The Criteria Builder allows you to set up a test which will compare one value to another value. The result of this comparison will return a true or false answer. 

Within Method, there are different actions that use the Criteria builder, most common being:

  • Conditional Statement: The result of the criteria builder will be used to branch the conditional statement. Different actions will occur depending on the true or false result.

  • Table actions: Some table actions use the Criteria Builder to find out which records to filter for.


Creating conditions

When you enter the criteria builder, you can add one or more conditions. At its core, a condition is made up of two sides, two values, which are compared to each other.

a grid lists all the conditions with the option to add more.

  1. If (All / Any) of the following are true:

    • All: Every condition must be true in order to return true.

    • Any: At least ONE of the conditions is true in order to return true.

  2. Field: the first dropdown is the first value to compare to. For tables and loops, the first dropdown is a field to compare its values from the table.

  3. Comparison: the second dropdown is the comparison operation to perform between the two values (See below).

  4. Where to Get Value: You can choose where the second comparison value is coming from:

    • User Defined: Use a value you manually type in. This can be a text value, a number, a date, a yes / no value, or one stored within a Shared Result. 

    • Control: Use a value taken from any control on the screen. 

    • Session: These are values stored in the session specific to the user currently logged in, e.g. the user name and Record ID.   

  5. User Defined Value: If you select a User Defined value in 4, this field will appear for you to type in the value.

  6. Add another condition: create additional conditions.

  7. Add another group: separate conditions into groups. This is similar to how parentheses work in mathematical equations - conditions in groups are calculated together.


Comparison Operators

When comparing values, you will have the following operations available to you.

  • Is Equal

  • Is not Equal

  • Greater Than

  • Greater or Equal to

  • Less Than

  • Less or Equal to

  • Is Empty

  • Is Not Empty

  • Contains

  • Does Not Contain

  • Starts With

  • Does Not Start With

  • Ends With

  • In List: You will need to specify a list of terms separated by a comma. This list is usually created by character joining text fields together. Note: The maximum amount of entries in this list is restricted to 2100 values.

  • Not In List: You will need to specify a list of terms separated by a comma. This list is usually created by character joining text fields together.

  • Is True

  • Is False

Note, when comparing dates, you will get the option to Compare dates using:

  • Date And Time

  • Date

  • Date of Month

  • Month

  • Year

  • Day Of Week


Examples

Example 1

In the below image, a Conditional Statement is used to check to see if the User logged in is named Errol. The result of this in the conditional statement is used to choose between two different actions sets.

NOTE: In these examples, you would not normally directly type in the a text value to compare with. It is used here only for example purposes.


Example 2

For table and loop actions, the criteria builder is used to find one or more records that match the criteria. In the below example, all records with a Record ID greater than zero will be returned.


Example 3

The action will go through all the records in the previously specified table, comparing each record's RecordID field to the number 5. If it finds a record with a RecordID of 5, then that record gets deleted. Of course, since RecordIDs are unique, only one record gets deleted.


Example 4

The action will go through all the records in the previously specified table, checking if its RecordID field is greater than zero. Of course, EVERY Record ID is greater than zero, so in effect, this will delete every record in the table! In other words, don't do this!


Example 5

Note that we have changed it to "If ANY of the following are true." The action will go through all the records in each table, checking if the name is either Bob OR Robert. If a record has either of those names, then the record is deleted.


Example 6

This time, we have added three groups, which may be tricky to see, but the last condition is not part of the second group, as indicated by the blue line bracket. Note, within each group, you can set it to Any or All.

  • Group 1: Returns true if the record is named either Bob or Robert

  • Group 2: Returns true if the balance is anywhere from 1 to a 1000.

  • Group 3: Returns true if the birth month is June.

A record is deleted only if all three groups are true. If any one of the groups is not true (e.g. Balance is 0), then the record is not deleted.

Did this answer your question?