Convert to number
Convert to number
Converts a text value to the numeric type, with support for different ways of handling the decimal part. Ideal for situations where a value was captured as text — from a spreadsheet or a web page, for example — and needs to be used in calculations.
Options
Value, text or variable
Enter the text value that will be converted to a number. It can be a fixed text, the return of another action or a variable.
Fraction types
Defines the strategy that will be used to identify the decimal part of the number. There are two options:
Amount
When you select this option, the robot considers the last N digits of the number as the decimal part. For example, with 2 places, the value "1234" becomes "12.34".
Number of Fractions
Enter the number of decimal places that must be handled. This field is only shown when the Amount option is selected.
Separator
When you select this option, the robot uses a specific character to identify where the integer part ends and the decimal part begins.
Fraction Separator
Enter which character separates the decimal part — comma or dot. This field is only shown when the Separator option is selected.
Returns
Custom code
actions["action-id"].number // value converted to a number (Number)
Field selection
- number — numeric value resulting from the conversion (Number)
Rules and Conditions
- The Value and Fraction types fields are required.
- The Amount option reads the last N digits as decimal places, ignoring separators.
- The Separator option requires the value to contain the chosen separator character to identify the decimal part correctly.
- If the value provided cannot be converted, the result may be invalid or empty.