Rule items

Rules > Rules manager > Rule items

Rules are statements configured to automatically execute a procedure triggered by a certain condition. Basically, rules consist of two parts: criteria and actions. Criteria are conditions that must be met in order to trigger an action (e.g., a criterion can be that the numeric value of a field is within a specified range). Actions are operations to be performed on a target element (e.g., changing the value stored in a field). In other words, it’s an "If-Then" (if this happens, then do that) statement.

The rules are shown as a list in the Rules section of the Rules manager. Click on a specific group to display just its rules.

  1. Click on the New rule button and type a Name on the Edit section that was just displayed. Optionally, add a Description where you can explain what the rule is for.

  2. Choose a Trigger and Target table.

    • The Trigger table is the table to which the criteria of the rule will apply.

      For cases where you wish to trigger the rule without criteria, then choose No trigger, but be aware that a type of rule like this must be called by the trigger IQL function.

    • The Target table is the table on which the action of the rule will be executed.

    When using Run iql, It is recommended to set the target table to the same table as the trigger table. Executions in other tables is done with operations in run iql.

  3. Other options

    • Optionally, keep the Only trigger once box checked in order to prevent rules from being triggered multiple times on the same record upon save action. This is useful in case the rule turns out to be recursive.

      Note that this setting cannot be combined with scheduled rules.

    • The checkbox called Use old relation value to identify target record is available only if the current record has a reverse relation to another table. If ticked, the rule targets the record pointed to by the Relation before the change that triggered the rule. If the checkbox is not ticked, the rule targets the record pointed to by the Relation after the change that triggered the rule.

    • The Active checkbox refers that the system will evaluate the content of the item.

      Use the More actions…​ button to activate or deactivate multiple rules selected at once.

  4. Choose Trigger conditions, i.e. the criteria that will activate the rule. Read more here.

    • Add more criteria by using the buttons AND and OR, which indicate logical-and and logical-or, respectively. The AND operator has the precedence over the OR operator, and is executed first. In the box that displays the trigger condition being assembled (in the lower portion of the form), this is expressed by lines beginning with an OR operator being indented.

      It is important to note that the criteria will only be evaluated if there are changes in the fields included (or changes in the record in question, in case Record keyword is chosen). In other words, a rule will not be considered unless at least one of the items (field/record) in the criteria is used when creating or saving a record on application forms, or editing via imports.

      This is, in order to perform the rule action, the criteria need to be evaluated first and return True (i.e., fulfill the required value or state).

      See complete examples of rules.

  5. Once the criteria is set, click on the Add button below and set an actions.

  6. Save.

Pay attention to the Warnings column of the Rules section as it may offer detailed information regarding issues encountered while running the rules.

Edit a rule

Select the desired rule and click the Edit button. Save the changes.

Delete a rule

Select the desired rule(s) and click the Delete button. Confirm deletion.

Copy a rule

Select the desired rule and click the Clone button. Do the proper changes and save after that.

Copying a rule may be useful, for instance, when several rules have to be created with the same criteria but different actions, and you want to avoid the manual creation of rules, one by one. Instead, copy, and edit a specific part of the rule.

Note that the rules will be executed in the order they are listed within the group, i.e., from top to bottom.