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:
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 statement 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.
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 not Equal
Greater or Equal to
Less or Equal to
Is Not Empty
Does Not Contain
Does Not Start 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.
Note, when comparing dates, you will get the option to Compare dates using:
Date And Time
Date of Month
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.
The below examples will use the action Delete Records in a Table.
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.
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!
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.
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.