Triggers are used to invoke the rules that are written in AppForms.If the form is selected and you create a new rule, then this rule will be triggered in the form load. Similarly if the selected control is a Button, then the rule will be triggered when the end user clicks on the button. For the other data entry controls, the rule will be fired when the value changes in the control
In AppForms there are two types of Triggers and control as trigger and default triggers. You can see the list of triggers in the left pane of the Rules Editor window in the designer (See Figure1).
For example, if you need to perform some actions in the time of form loading then create a rule with those actions and then set the trigger as Formload and that rule will get invoked each time the form gets load.
1. To set the Trigger to a Rule
When you add a new rule to the form then you need to set trigger to invoke it. For that select the rule name in the ‘Rules’ section in the left pane of Ruled editor window. There is section Triggers were you can see all the default and control names that can be set as a trigger to that rule. Then click on the trigger that you want to set, and click on the button (Figure 3) then it will be set as the trigger to that rule.
2. Write a rule associate to a control (Trigger will set automatically when rule creates )
You can add rules associate to a control in the form. Then that control will be the trigger to invoke the rule. For this click on the control and in the coming popup (Properties window) take Rules/Attributes then click on create rule (see Figure4)
And when creating rule you can see that the rule is created and the control is set as the trigger for this rule (Figure5)