Convert Value
You can use this step to convert a manually specified value or, together with an extract step, to convert an extracted value.
To perform the conversion for a manually specified value, the Convert Value option must be selected in the drop-down list. To perform the conversion for an extracted value, in the drop-down list, select one of the extract steps.
Properties
- Convert Value
-
The source value to convert.
- Evaluate Expression step
- Contains a list of conversion functions suggested for use on a value. The function list suggested for a particular
value is limited, depending on the value type. To specify a conversion function, in the step context menu, click
Evaluate Expression step, and then do either of the following:
- Select the required function from the list of suggested functions.
- Click Plain to manually type the required function. For example, if you need to extract a text that represents an integer and store it in an Integer variable, you can use the expression $initial.integer().
For more information on the supported functions and examples, see Expressions.
A converter can contain one or more Evaluate Expression steps.
- Store Current In step
- Stores a converted value in a variable of specified type. The type of the value must match that of the variable and can be one of the following: Integer, Boolean, Number, or Text.
- The converter can contain one or more Store Current In steps. For example, this can useful if you need to extract a full name of a person and store it in two variables, such as for the first name and last name respectively, inside the same converter group.
A converter group can also contain the following set of action steps:
Example: Capitalize expression "hello world"
The following example demonstrates how to capitalize the expression "hello world" and store it in a variable of type text.
-
Add a Convert Value step to your automation workflow and configure it as follows.
-
Under Convert Value, type "hello world".
-
After the expression, right-click the flow point and click
.
-
-
After you execute the first part, the initial (given) value of the "hello world" expression is assigned to the variables $initial and $current.
-
As you continue the execution, the expression is capitalized by the converter (note =$current.capitalize() in the following example), the variable $current is assigned a new value, "Hello World", while the $initial variable value remains unchanged. The new value of the $current variable, "Hello World", is stored in the variable text of type text after the Store Current In step is executed.
For more information on the $initial and $current variables, see Data Conversion.