# Variables by Workato
Workato variable is a user-declared datapill that contains a data value. These user-declared variables are different from a standard datapill in that your declared variables are mutable - the value of the variable can be changed within a recipe.
The lifetime of a variable is for the duration of a single job (job scope) - there is no persistence, and no mechanism can access this across different jobs.
If you want to find a particular entry within a report - the entry with the largest ARR.
- Create a variable called
- Run the for each action, and update
ARRwhenever it finds a higher value.
- Subsequently, use the
ARRvalue to call up that specific entry.
Iterate through the report for highest ARR
# Connection setup
No connection setup is required. Simply select App > Variables by Workato to get started.
Variables by Workato
# Create variable action
This action creates a variable in the specified data type. You should configure this variable to match the data type that it will be used for (e.g.
|Variable name||The name of the variable.|
|Variable type||The data type of the variable.|
|Default value||The default value of the variable. Leave this blank to set the default value as |
# Update variable
This action updates an existing variable. You can only update variables managed by Variables by Workato.
|Variable name||Select the variable to update.|
|Value||The new value of the variable.|
Note: This action does not generate a datapill. To call your custom variable, use the output of the Create variable step.
# Example: Creating a name variable from an image file
Suppose you want to read a name from an image file (e.g. PNG). You can generate a
Name variable and add the values for First name, Middle name, and Last Name.
Create a name variable from an image file
See the full example recipe here.
# Create list action
This action creates an empty list with its item schema. The list item schema will apply to every item in the list.
|List name||The name of the list.|
|List item schema||Define the properties of each item on this list.|
# Define list item schema
The list item schema will show up as a list of usable variables in the output datatree. These variables can be mapped unto subsequent recipe steps. Use Add field to define a new field.
Add new field
|Name||The name of the new field.|
|Data type||The data type of the new field.|
|Optional||Select if this new field is mandatory.|
|Hint||A description of this new field.|
# Add item to list
This action appends a new item entry to an existing list. You can only update lists managed by Variables by Workato.
Some item fields are mandatory. Check that you have valid inputs for the required fields before using this action.
Add item to list
|List name||Select the list to add your new entry.|
|Insert location||Select the location of the new entry.|
|List item||Define the values of the new entry.|
Note: This action does not generate a datapill. To call your list, use the output of the Create list step.
For more information on list management, see here.