<< Click to Display Table of Contents >> Actions components |
Actions are defined by five components:
1.The action's context.
2.The action's name.
3.The condition to evaluate.
4.The action to perform if the condition is met.
5.The action to perform if the condition is not met.
To define an action, go to the Actions & Validations wizard and click the Add new action button within the Actions tab:
1. Define the action's context
Actions can have two different contexts (starting points to navigate the data model): the task's form or a collection. When creating a new action, the first thing you must do is to define the action's context.
2. Name the action
The second step you should perform is to assign the action a meaningful name. Although the Name field is not mandatory, we strongly recommend to fill it as it facilitates the organization, search and filtering of the actions you have created.
If you decide to leave this field empty, two things will happen:
1.The action is created with Unnamed action as assigned name. This name remains until you define a more meaningful one.
2.Each time you open the action, the cursor locates itself in the Name field in order to invite you to assign a name.
3. Define the conditions (If)
Once you have defined the context and assigned a name to your action, you can proceed to define the conditions. By default, the Actions and Validations wizard displays a row to create a condition.
Conditions have three elements: a control, an operator and a value.
•Control: Defines the control to be evaluated. This control MUST be included into the form where the actions are configured.
Exclusive boolean controls within a table cannot be used as controls within actions and validations. |
•Operator: Defines the comparison operator for the condition. The available operators are:
Operator |
Description |
Applies to controls |
---|---|---|
Is loaded |
Evaluates if the form has loaded. |
Forms |
Evaluates if the value of a control has changed to a specific value. |
Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date |
|
is different to |
Evaluates if the value of a control is different to a specific value. |
Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date |
Evaluates if the control is empty. |
Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date |
|
is not empty |
Evaluates if the control is not empty. |
Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date |
Evaluates if the value of a control has changed. |
Combo, Cascading combo, List, Radio, Search, Suggest, Currency, Number, Date |
|
does not contain |
Evaluates if the value of a control does not contain an specific character. |
Text box |
contains |
Evaluates if the value of a control contains an specific character. |
Text box |
begins with |
Evaluates if the value of a control begins with an specific character. |
Text box |
does not begins with |
Evaluates if the value of a control does not begin with an specific character. |
Text box |
is an invalid email |
Evaluates if the value of a control is an invalid email. |
Text box |
less than |
Evaluates if the value of a control is less than a specific value. |
Date, Currency, Number |
less than or equal to |
Evaluates if the value of a control is less than or equal to a specific value. |
Date, Currency, Number |
Evaluates if the value of a control is greater to a specific value. |
Date, Currency, Number |
|
greater than or equal to |
Evaluates if the value of a control is greater than or equal to a specific value. |
Date, Currency, Number |
Evaluates if a row has been deleted in a table. |
Table |
|
Evaluates if a button has been clicked. |
Button |
|
Evaluates if the value of a control is equal to true. |
Boolean |
|
Evaluates if the value of a control is equal to false. |
Boolean |
|
has a file uploaded |
Evaluates if a file control has a file uploaded. |
File |
has not files uploaded |
Evaluates if a file control has not files uploaded. |
File |
•Value: Defines the value to be compared with the control. This value can be a constant or a data binding.
Date type values
The date type values can be defined in three ways: a fixed date, a function or a data binding.
•As a fixed date, you choose the specific date to be compared with the control.
•As a function, you have available two functions today and now, both take the current day as the date to be compared with the control. The now function additionally contains the hour of the day and is available for date controls that have enable the show time property.
•As a data binding, you choose another date type control from the form.
Multiple conditions
You can create compound conditions made of multiple conditions or group of conditions connected with the AND and OR operators.
To add a single condition click the Add a condition button; accordingly, select Add group to create a group of conditions. You can switch between the AND and OR operators by clicking them.
4. Define the main actions (Then)
With the conditions already defined, the next step is to define the actions that will be executed if the conditions are met. By default, the Actions and Validations wizard displays a row to create an action.
If you need to create more actions, you can do so by clicking the Add button. You can create as many actions as desired.
Actions have three elements: a property, a control and a value.
•Property: Defines the property whose behavior will be modified. Within the properties you will find:
Property |
Behavior |
---|---|
Set background for |
Changes the control's background color |
Set forecolor for |
Changes the control's color |
Changes visibility for |
Makes a control visible / invisible |
Changes editability for |
Makes a control editable or read-only |
Set required for |
Makes a control mandatory or optional |
Set value for |
Sets a value for a control |
Set minimum value for |
Sets a minimum boundary value for a control |
Set maximum value for |
Sets a maximum boundary value for a control |
Collapse |
Collapses/Expand a group |
Set as active |
Sets a Tab as active |
Refresh |
Refreshes the control's value according to what has been entered in the form. It is very useful when a control's value depends on the value of another or the execution of an interface or expression. After executing a Refresh, the engine evaluates if there is an action related with the control(s) to be refreshed. If so, the actions of these controls are executed again to keep the state of the form. Not supported in Add forms of a Search control |
Execute rule |
Executes an expression. |
Execute interface |
Executes an interface. |
Execute SAP |
Executes the SAP Connector |
Execute Connector |
Executes a Connector |
Execute agent |
Executes an AI Agent that automates a task of your process. |
Clean data for |
Deletes any data entered in a control. |
Click On |
Automatically clicks on the Save or Next buttons. |
•Control: Defines the control to which the behavior will be applied.
•Value: Defines the value that will be applied to the property.
5. Define the action if the condition is not met (Else)
Finally, you can define the actions to be performed if the defined conditions are not met. By default, the Actions and Validations wizard does not display the Else statement. If you create an action without including the Else actions, it means that you do not want to perform any action.
Conversely, to define a set of actions to be performed if the defined conditions are not met, click the + Else button. This adds a row to define an Else action in the same way as main actions.
Error handling
To guarantee metadata integrity, the Actions and Validations wizard verifies that actions are correctly defined before they can be saved. Hence, you must ensure that all the conditions (If) and actions (Then) fields are properly set.
Two types of error can occur when defining these settings:
1.If any of the required fields is missing and you click the Apply button to save the action, the wizard displays an error message. Furthermore, the required field is highlighted in red until you configure it.
2.If there are no rows to define conditions or actions, the wizard displays an alert message indicating that you must include at least one expression. As the wizard always shows by default a row in the conditions and actions components, this error occurs only if you delete this row.
When you need to affect several controls that are one next to the other in a form, you can make use of the Panel control to group them. This way you can affect the whole group instead of making individual actions for each one.
This control is found in Bizagi's containers on the Form designer.
Using actions can save you time, check out the following image to compare how.
Both Actions are correct, and will do the exact same thing. But using Panel will make the form designs faster.
Consider these concepts related to Panels: •Using Panel will only help you to work with Actions, it will not affect the end user interface in any way. •Panels can be used to set background color, change visibility, change editability and refresh. |
Actions examples
Click to see examples of how to configure basic actions
Click to see an example of how to configure other actions
Click to see how to configure actions over tables
Last Updated 10/17/2024 4:49:33 PM