The Scope control allows grouping actions within a specific container/block in the Action Builder, that enables the encapsulation of actions in a set of actions, and specifies which actions should be executed based on the result of the action execution (IsSuccessful, HasFailed). Scope control helps to organize actions, manage the action execution. The main advantage of the Scope control is the handling of the errors within the scope: you can easily set up error handling within the scope in the HasFailed block. That helps to consolidate all errors in one and eliminate the need to set up error handling for each of the actions.
Scope control is available for Modern Forms, List Actions, Automation Actions and Scheduled/Triggered actions as well.
For more information about Action Builder read Action Builder introduction article.
To configure the Scope control you need to add action/actions in the appropriate blocks:
Configuration
Property | Required | Type | Description |
Scope action block |
no | Block of actions will be executed within the scope. | |
Is successfull |
no | Block of actions will be executed when actions in the Scope block executed successfully | |
Has failed |
no | Block of actions will be executed when actions in the Scope block failed |
Example of Scope control configuration on the current site
Availability
Modern Forms | List Actions | Scheduled/Triggered Actions |
✓ | ✓ | ✓ |
Output*
Output Parameter | Type | Description |
IsSuccessful | Boolean | The output of this action returns true of false depends on the action execution was successfull or not |
HasFailed | Boolean | The output of this action returns true of false |
ErrorMessage | String | Returns error message in a case the one of the actions in a Scope action block fails |
WarningMessages | String | Returns a list of warning messages in case actions within Scope action are successfully finished but with warnings (Scheduled/Triggered Actions) |
* You can use outputs of the Scope inside the Scope in Is Successful and Has Failed blocks and also outside the Scope control.