show / hide menu

Default Triggers

Introduction

Triggers are used to invoke the rules that are written in AppForms.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). This document explains about the default triggers in Claysys Appforms.

Figure1

Default Triggers

The default triggers in ClaySys AppForms are (see Figure2)

Figure 2

1. FormLoad Trigger

The FormLoad trigger is triggered at the time of the form loads. The rule and the primary actions that to be worked during the time of form loading will written in the trigger of FormLoad. Write the rule with actions and decisions and set the trigger of the rule to FormLoad. You can add the first things to happen when a form is loading can be added in this rule.

2. FormUnload Trigger

The FormUnload trigger is used to trigger the rule when the form is unloaded. The actions in this trigger will work at the time of the form gets closed or when we deviate from that form. The actions, which is need to work only from when we move from that form can be written on this trigger.

3. NavigateAway Trigger

When we open a new form from parent form, then rule in the NavigateAway trigger of parent form will execute. This can be achieved by loading another form using LoadForm rule or the call the form in the click action of a button.

4. OnSpellCheck

The rule which is set on the trigger of OnSpellCheck will begin to execute when Spell check is performed. For this you need to write down the rule in the OnSpellCheck trigger and then enable spell check property in any of the text box (Figure3). Then place one button and set the click action of that button to Spell check (Figure4). Then click type any wrong spelling and click on that button to check spelling, find the correct spelling and replace it. Then clicking on done button that rule in the OnSpellCheck trigger will work and the actions in that rule will start to execute.

Figure 3

Figure 4
Figure 5

5. ExecuteComplete

The ExecuteComplete trigger is used to trigger one rule in the completion of one Async Execute Command in the form. When an execution of one ExecuteCommand is completed the actions in the rules which is in the trigger of ExecuteComplete will start to execute.
We are using a temporary variable and set the Execute command as the value of variable as in the figure6

Figure 6

Then the rule which is written in the trigger of ExecuteComplete will initially check whether the value of the variable before it starts to execute (see figure8). This method is used when there are multiple execute commands in one single form and we want to happen the ExecuteComplete trigger is only when one particular Execute command is completed.

Figure 7

6. FillDataCompleted

This is also same as ExecuteComplete Trigger and the only change is this trigger is considering the Fill completion of any of the fillData call in the form. An async call of a Filldata command is get completed and this rule will begin to execute.
The above described checking method is also follows in this one also (see figure 8 and 9).

Figure 8
Figure 9

This can be set to a fillData call to any control like Combo box, Search grid etc.