Configuring Actions 
You configure actions to define the behavior of controls. You configure two types of actions:
Predefined actions: Standardized events, such as closing a window or inserting or deleting a row.
Custom actions: Specialized actions that you define to meet a specific business need that is not addressed by the available predefined actions.
You can also configure compound (multiple) actions for a control.
Configuring an action involves:
Defining the action on a control
Defining the behavior of the action
You have added a control to a view or container element.
On the Layout board, choose Action from the context menu of the control for which you want to define an action.
Note
To define a single custom action, with only its name (and no other properties), you can enter its name in the Action field in the Configure task panel. You do not need to open the Define Action dialog box. The Action field is only editable if no actions have yet been defined for the control, or if the only action defined for the control is a single custom action.
Use an asterisk (*) before an event name to indicate that if any event of the same name (without the asterisk) is raised, all events of the name with the asterisk will respond.
In the Actions tab of the Define Action dialog box, click the Add Action button.
Choose an action that you want to define for the control. You can choose either a predefined action from the list or Custom Action to define a specialized action.
Note
Choose Other to display additional predefined actions.
Under Action Properties, define the properties for the action. The available properties depend on the action you choose. For a description of all the action properties, see Define Action Dialog Box in the Visual Composer Reference Guide.
For certain action properties, you can define the value using a dynamic expression (by clicking the fx button). For more information, see Working with Dynamic Expressions.
If you have defined multiple actions for a control, choose an option in the Execution mode dropdown list box to specify how the actions should be performed:
Sequence: Indicates that the first action in the list should be checked at runtime to see whether its defined condition criteria are met. If yes, the action is performed and the next action in the list is then checked, and so on. This process continues until all actions in the list have been checked and all actions that meet the condition criteria have been performed.
Switch: Indicates that the first action in the list should be checked at runtime to see whether its defined condition criteria are met. If yes, the action is performed and no other actions in the list are checked or performed. If no, the next action in the list is checked, and so on.
Note
You can modify action definitions at a later stage by right-clicking the control for which the action was defined, and choosing Edit Action from the context menu. In the displayed dialog box, you can modify the action definitions as required.
To ensure that a control loaded with a predefined action is enabled at runtime, that action must meet its precondition. Preconditions for predefined actions are mentioned in the table below:
Action |
Precondition |
|---|---|
Assign |
The target node is not empty |
Back |
The navigation history is not empty |
Clear |
The node to clear is not empty |
Copy Row(s) |
The set of source objects to copy is not empty |
Delete Row(s) |
The set of objects to delete is not empty |
Find Row |
The node to search is not empty |
Insert Row |
If the node is not a root node, then its parent node is not empty |
Move Row(s) |
The set of source objects to move is not empty |
Sort Rows |
The node to be sorted is not empty |
For Insert Row(s) and Delete Row(s) actions, in addition to preconditions, cardinality determines their runtime behavior:
Cardinality |
Behavior |
|---|---|
0...1 |
User cannot insert more than one element to a node |
1...1 |
User cannot insert or delete an element |
1...n |
User cannot delete the last element of a node |
Note
If compound actions have not met preconditions, the following warning message is displayed: Some actions could not be executed.
If preconditions for Insert Row action are not met, the following message is displayed: Add a parent before inserting a child.
In the Validation tab, specify the controls that are validated when this action is triggered
Recommendation
Do not change default settings in this tab, unless you need to change the validation behavior for a specific control. For example, you may want to remove validation for a Cancel button.
For more information, see Defining Validation Rules.
Choose Close.
The actions are defined and are enabled at runtime.