1,545
edits
Marek Rodak (talk | contribs) |
|||
Line 614: | Line 614: | ||
Rules describe sequences of steps that are executed when a user is filling out the questionnaire. These steps allow you to further customize the questionnaire form’s design and usage (hide or disable form fields, assign values to them, etc.). To create a rule, open the [[Rules editor]] by clicking on the corresponding event button. | Rules describe sequences of steps that are executed when a user is filling out the questionnaire. These steps allow you to further customize the questionnaire form’s design and usage (hide or disable form fields, assign values to them, etc.). To create a rule, open the [[Rules editor]] by clicking on the corresponding event button. | ||
{| class="wikitable sortable" | |||
|- | |||
! Action | |||
! Description | |||
|- | |||
| [[On Load]] | |||
| These rules are checked when you open a form. You can use these rules for example to apply custom format to certain records. | |||
|- | |||
|| [[On Change]] | |||
| These rules are checked when any field is modified. Example: simple form validation. <br><small>They are also executed when you open a form (a new form starts empty, then the values are changed as they are loaded from the database and displayed).</small> | |||
|- | |||
| [[On Save]] | |||
| These rules are checked when you save a record. For example, saving a record can automatically also update a field in a parent record. <br><small>For questionnaires, on save rules can be performed either [[Questionnaire_Designer#Validate|when you save them or when you complete them]].</small> | |||
|- | |||
| [[On Can Execute]] | |||
| This rule is executed when a command is about to be displayed. Use it to control in which situations users can see and use the command, so that you can hide this command in situation, when its action is not suitable. See [[Form commands]] for more information and examples. | |||
|- | |||
| [[On Execute]] | |||
| This rule is executed when a command is pressed / tapped. It defines the actions that the command performs. | |||
|- | |||
| [[On Create]] | |||
| In questionnaires, the rule is executed when a new questionnaire is created (even before On Load). | |||
|- | |||
| On Repeat | |||
| This rule is executed when a new instance of a repeatable group is displayed. | |||
|- | |||
| On Delete | |||
| This rule is executed when an existing instance of a repeatable group is deleted. | |||
|} | |||
* '''On Create''' rules are executed when a questionnaire instance is about to be created. They can be used to populate variables for the reuse fetch. Requires [[Questionnaire_Designer#Rules_version|version 3]] (or later) of rules and [[Releases/Spring_2022|version 15.0]] (or later) of the mobile app. | * '''On Create''' rules are executed when a questionnaire instance is about to be created. They can be used to populate variables for the reuse fetch. Requires [[Questionnaire_Designer#Rules_version|version 3]] (or later) of rules and [[Releases/Spring_2022|version 15.0]] (or later) of the mobile app. | ||
* '''On Load''' rules are executed when the questionnaire form is displayed on the screen. | * '''On Load''' rules are executed when the questionnaire form is displayed on the screen. |
edits