Parse Integer
Last modified: July 4, 2025
Introduction
This document describes the function that converts a string to a value that is of data type Integer/Long.
parseInteger
Takes a string and parses it to an Integer/Long.
Input Parameters
The input parameters are described in the table below:
A default value can be specified to handle parsing errors. If no default value is provided, an error will occur if the string is not a number or if the parsed value is not within the range of valid values for an Integer/Long. The range of valid values for an Integer/Long can be found in this table of supported data types.
Output
The output is described in the table below:
Examples
The examples below illustrate which value the expression returns:
-
If you use the following input:
parseInteger('42')the output is:
42 -
If you use the following input:
parseInteger('not_an_integer', 42)the output is:
42
