On Execute: Difference between revisions
Marek Rodak (talk | contribs) No edit summary |
Marek Rodak (talk | contribs) No edit summary |
||
| (33 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Rules TOC | {{Rules TOC}} | ||
<span style="float:left; padding-right:10px">[[File:On Execute button.PNG| | <span style="float:left; padding-right:10px">[[File:On Execute button.PNG|alt=On Execute button icon|100 px]]</span> | ||
App users can execute commands from their app, for example, run a mobile report or delete several records at once. Predefined commands usually function out of the box. However, you can use rules to define their availability and tweak their function. On Execute lets you define | App users can execute commands from their app, for example, run a mobile report or delete several records at once. Predefined commands usually function out of the box. However, you can use rules to define their availability and tweak their function. On Execute lets you define actions that the command performs. This rule is triggered when the command button is pressed. For example, It can be filling in some data, hiding fields, etc. | ||
On Can Execute rule then modifies in which situations users can see and use the command. | |||
On Execute is available for the following user interface components: | |||
*[[Form]]s | |||
*[[Questionnaire Designer|Questionnaires]] | |||
In Woodford, you can edit the commands available for a form. In Questionnaire Designer, you can edit the commands available when filling out a questionnaire. | |||
===Commands=== | |||
List of available form and questionnaire commands can be found [[Command editor#Available commands|here]]. | |||
== Forms == | |||
=== Example: Field clearing command=== | |||
===Example | |||
We creat a custom command custom_del_street. When clicked, Entity.addres1_line1 field is cleared. | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
| Line 22: | Line 25: | ||
| '''Then Step''' || Entity.addres1_line1 || Clear | | '''Then Step''' || Entity.addres1_line1 || Clear | ||
|} | |} | ||
===Example: Copy the record (Opportunity)=== | |||
We create a custom command custom_copy. When clicked, new instance of the record is created and data are copied. | |||
[[File:OnExecute custom copy.PNG|alt=On Execute: Copy the record rule example|600px]] | |||
=== Execute commands from different rules === | |||
Since [[Releases/Summer 2023|release 16.1]], it is possible to execute [[Command_editor#Form_commands|form commands]] also from different rules, not only On Execute. This feature can be very useful as it makes it possible to execute command logic as a reaction to field change or button click. It is even possible to hide commands from the hamburger menu by disabling [[On Can Execute]], preventing users from executing commands explicitly and only executing them from rules. | |||
[[File:Execute-command-from-other-form-rules.png|alt=On Execute: Execute commands from different rules: Update Address command executed from rules example]] | |||
{{Feedback}} | |||
Latest revision as of 12:36, 20 November 2023
| Rules and examples |
|---|
|
App users can execute commands from their app, for example, run a mobile report or delete several records at once. Predefined commands usually function out of the box. However, you can use rules to define their availability and tweak their function. On Execute lets you define actions that the command performs. This rule is triggered when the command button is pressed. For example, It can be filling in some data, hiding fields, etc.
On Can Execute rule then modifies in which situations users can see and use the command.
On Execute is available for the following user interface components:
In Woodford, you can edit the commands available for a form. In Questionnaire Designer, you can edit the commands available when filling out a questionnaire.
Commands
List of available form and questionnaire commands can be found here.
Forms
Example: Field clearing command
We creat a custom command custom_del_street. When clicked, Entity.addres1_line1 field is cleared.
| If Condition | Command.Name | Equals | custom_del_street |
| Then Step | Entity.addres1_line1 | Clear |
Example: Copy the record (Opportunity)
We create a custom command custom_copy. When clicked, new instance of the record is created and data are copied.
Execute commands from different rules
Since release 16.1, it is possible to execute form commands also from different rules, not only On Execute. This feature can be very useful as it makes it possible to execute command logic as a reaction to field change or button click. It is even possible to hide commands from the hamburger menu by disabling On Can Execute, preventing users from executing commands explicitly and only executing them from rules.
{{#CI form: title = Was this information helpful? How can we improve? | type = inputs | [textarea] }}