Introduction to Workflow Parameters
I. What is the workflow parameter
A parameter object in a workflow is like a field in a worksheet. It is used to hold the value of a field, or the result of an operation node, or to receive values passed in from other workflows, which are then used by other nodes. When the workflow ends, the parameter values are cleared and reset.
II. How to define workflow parameters
Go to [Configuration] > [Parameters], you can create the required parameters. There is no limit to the number of parameters.
Parameter Type
Text, Numeric(amount), Date/Time, Members, and Department.
When setting parameters, you need to select the correct type, because the corresponding field type is required later when assigning values.
Parameter Name
The name must start with a letter and can contain numbers and underscores.
The parameter is created without an initial value and is assigned a value when the workflow is executed.
III. How to assign values to parameters
1. Update the parameters of the workflow
You can assign values to the parameters of the workflow through the node [Update Parameters]. It is similar to the node [Update Record], which treats the parameter as a field.
2. Update the parameters of the subflow
Add the node [Subflow] node to assign values to the parameters of the subflow.
If there are no parameters configured in the subflow, there are two ways to configure them.
Click [Parameter Setting] to quickly add the parameters of the subflow.
Go to the configuration page of the subflow and click [Configuration] > [Parameters] to add parameters.
IV. Examples
The following are the workflow models that require parameters:
As shown above, worksheet A has no association with worksheet B. The value of record A’ cannot be used in the subflow because they are not in a workflow. Instead, you can configure parameters. You can locate record A’ by parameters in the subflow so that you can use the value of record A’.
Use Case
In the worksheet Total, create a record with a start date, an end date, and a total value. You need to create a workflow to find all orders that match the criteria based on the record in worksheet Total, and then aggregate those orders and update the values to the record in Total.
Worksheet Configuration
1. Worksheet - Total
2. Worksheet - Order
Requirement: In the record of Total, after entering the start date and end date, to automatically count the total amount of orders during the period and write it to the field [Statis] in Total.
Workflow Configuration
Main workflow
Select to create a workflow triggered by a custom action. When the workflow is triggered, it obtains the records from the worksheet Order based on the conditions and passes the data to the subflow.
As shown in the figure below, don’t forget to define the parameters in the subflow before you configure them.
Subflow Configurattion
A parameter has an initial value at the start of the execution of a subflow. Then you can add the node [Get Single Data] to find the target record in the worksheet Total.
The last step is to update the amount of the orders into the field [Stats] in the worksheet Total.
Have questions about this article? Send us feedback