Within Method, there are three types of actions which use the Criteria builder:
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. Depending on the action, this will accomplish different results.
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.
For the conditional statement, the criteria builder will return a true or false statement. This result is used to branch an action list so that different actions are done depending on the true or false result.
In the below example, we are checking to see if the User logged in is named Errol. Depending on the result, two different actions sets can be done.
When you enter the criteria builder, a grid lists all the conditions with the option to add more.
The below examples will use the action Delete Records in a Table.
The function will go through all the records in each 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 function will go through all the records in each 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 function 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. Note within each group you can set it to Any or All.
A record is deleted only if all three groups are true. If any one of the groups is not true (e.g. Age is 25), then the record is not deleted.