Description
The Process function in Smenso allows executing a series of actions sequentially. It is used to manage complex workflows in a formula by executing multiple steps in a defined order. This function is particularly useful when intermediate steps are required, and their results need to be used in subsequent actions.
Syntax
Process(action1, action2, ..., actionN)
Arguments
| Argument | Description |
|---|---|
action1, action2, ..., actionN |
A series of actions executed sequentially. Each action can be a supported function such as SetProcessMessage, HTTPPost, LoadProject, or set. |
Return Types
The function does not return values directly. It is used to execute actions, allowing the results of individual steps to be used in subsequent actions.
Examples
| Description | Formula |
|---|---|
| Creating a Calculation |
Process(
'SetProcessMessage("Creating Calculation..","envelope")',
'LoadProject("ba2486c7-12d8-4f44-ba1d-515497e4d98c")',
'set("Invoice","(Unknown)")',
'HTTPPost("https://example.com",
"application/json",
JSONPackage(
"projectID", projectGuid
)
)'
)
|
Explanation of the Example
The example demonstrates creating a calculation memo using the Process function:
- SetProcessMessage: Displays a status message to indicate progress.
- LoadProject: Loads a specific project based on its GUID.
- set: Stores a variable (
Invoice) with a default value. - HTTPPost: Sends the collected data to an external API.
Notes
- Sequential Execution: Actions are executed one after another. The success of one step may affect subsequent actions.
- Error Handling: If a step fails, specific error messages can be defined using
SetProcessMessage. - Combinations:
Processcan be combined with other functions likeif,SetField, orGetProcessResultto create dynamic and conditional workflows.
Comments
0 comments
Please sign in to leave a comment.