Skip to main content

Create variable

Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

Create a new variable and set its initial value. This command allows you to define variables of different data types that can be used throughout your workflow.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Variable name

Enter a name for the variable that will be used in the workflow

-

Yes

Keep it concise and clear, 2 to 32 characters; Cannot start with a number; Avoid using common programming words

Data type

Specify the variable type

String, Number, Boolean, Data table, List, Dictionary

Yes

-

Item type

Select the data type for each item in the list

String, Number, Boolean, Any

Yes (for List type)

Only applicable when Data type is set to List

Initial Value

Set an initial value for the variable

-

Yes

Format depends on the selected data type

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

The variable created with the name specified in "Variable name" parameter. This variable can be referenced in subsequent actions throughout your workflow.


Using Variables in Conditions

You can use the variable created by this action in other actions by selecting the variable icon or typing {variableName}. The variable will be accessible throughout the workflow unless it's overwritten by another action.


Notes

  • Different data types require different formats for initial values:

    • String: Text values (e.g., "Hello")

    • Number: Numeric values (e.g., 123)

    • Boolean: true or false

    • Data table: Usually initialized as an empty table []

    • List: Array of values (e.g., ["A", "B", "C"])

    • Dictionary: Key-value pairs (e.g., {"name": "Tom", "age": 30})

  • Variable names must be unique within the workflow

  • Variables created at the workflow level can be used in any action within that workflow

Did this answer your question?