The Criteria Builder allows you to set up a question or 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 three types of actions which use the Criteria builder:

  • Conditional Statement
  • Table actions
  • Loop actions

For the conditional statement, the true or false result of the condition is used to branch between two different action lists. Different actions will occur depending on the true or false result. 

In the below image, we are checking to see if the User logged in is named Errol. We will use this result in the conditional statment to choose between two different actions sets.

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.

Creating conditions

When you enter the criteria builder, 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. These include:

  • 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
  • Not In ListIs 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

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.

Examples

The below examples will use the action Delete Records in a Table.

Example 1

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 2

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!

Example 3

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 4

This time, we have added three groups, which may be tricky to see, but the last condition is not part of the second grou, 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?