Skip to main content
Version: 7.9


This function is used by Ignition's Expression language..


Identical to the toInt expression function.


toInteger(value[, failover])

  • Parameters

    • object value - The value to type cast.

    • object failover - Optional. The failover value if type casting fails.

  • Results

    • int - The value type cast as an int.


Code Snippet
toInteger("38") //returns 38
Code Snippet
toInteger("33.9") // returns 34
Code Snippet
toInteger({Root Container.TextField.text}, -1) //returns the value in the text box as an int, or -1 if the value doesn't represent an number.