Questionnaire Designer: Difference between revisions

Jump to navigation Jump to search
Line 658: Line 658:
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.


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 before a questionnaire instance is 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.
* '''On Change''' rules are executed whenever users change any value. <small>On Change rules are also executed when a questionnaire is first displayed.</small>
* '''On Change''' rules are executed whenever users change any value. <small>On Change rules are also executed when a questionnaire is first displayed.</small>
Line 666: Line 666:
* '''On Can Execute''' rules configure when a command is available.
* '''On Can Execute''' rules configure when a command is available.
* '''On Execute''' rules configure what happens when a command is executed.
* '''On Execute''' rules configure what happens when a command is executed.
* '''On Create''' rules are executed before a questionnaire instance is created. They can be used to define additional variables which can be used in the reuse fetch. This can ensure that inspectors can select from a relevant list of answered questionnaires.


In the rules editor, add rules and conditions using the toolbar to create your rule script.
In the rules editor, add rules and conditions using the toolbar to create your rule script.

Navigation menu