updateVariable Step
Description:
This step updates a workflow variable with user-defined values.
Inputs
- variableName – the name of the variable to update
- variableValue – value of the variable
- updateVariables – update multiple variables with values
- hasExpression – has expression (Yes/No). Consider the data as an expression for YES and the data by itself for NO configuration
Returns
- True –variable updated successfully
- False – variable not updated
Usage:

Example:
Let’s build and execute the “updateVariableDef” example.
- Create a new process definition called “updateVariableDef” and open the definition in designer mode.
- Drag the “task, updateVariables” steps to the canvas.
- Connect the dots between the “Start” step and other steps, as shown above.
- Define a variable or a global to store the result.
- Click the “Task” step to configure its “Required” properties. Provide a name for the step. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the “Task” step to configure its “Optional” properties. Click the button to configure the users to route the form as shown below.

- Click the "updateVariable" step to configure its "Required" properties. Provide a name for the step. Click the Save button. Note: Click the "AI Predict" button for the Copilot to add new process steps that match your process description.

- Click the "updateVariable" step to configure its "Optional" properties. Click the button to configure multiple variables and values. A pop-up window is displayed for configuration. Click the Add Row (+) button to insert an empty row. Provide the variable name and value. You may insert multiple variables using the Add Row button. You can click the duplicate icon to quickly repeat the last row and overwrite it with a new name and value. Click the Save button. Configure “Yes” if the value to be computed is an expression. Note: Use either single variable references or multiple ones, not both.

- Expression Builder Utility. Click inside the textbox. Use the keyboard shortcut “ALT + E” to invoke the expression builder. This utility shall enable the building and validation of expressions, as shown in the image below. Send the expression to the clipboard and paste it into the input field.

- Example for conditions to evaluate:
e.g. Variable.number + 10 >100
e.g. Global.testNumber + 100 / Variable.colNum >=1000
e.g. Variable.data + "test" == “Apptest”
e.g. Global.hasData == 1
- Save the process definition, create a process instance, and then execute it. This step should update the variables with values. Render the process instance. Select the "Items"> "Variables"> "Latest" menu option to view the variable values.

Definition Sample:
You may download the sample definition(s) from the link here and later import them (drag-and-drop) to your FlowWright Process Definition (XML file) or Form Definition (HTML file) page.
Note: Please verify and complete the process steps for any missing configurations, such as file path references and database connections, after import. Then, save the definition to confirm the changes.