Apply

How to Convert a Floating Point to an Integer (INT)

Using Advanced Expression Piping within your forms you can create mathematical formulas in order to calculate a value. This article will explain the process of using the INT function to convert a floating point to an integer.

The INT function allows the expression to convert a floating point into an integer for either a single value or a list of values from a number of given fields. For example, if a value results in 1.0 we can use INT to convert it to 1.

Converting the value into an integer would allow the value to be used within a text response field using text field validations such as currency or integers (Positive Numbers).

The setup and formatting of the INT expression is imperative in preventing an error message from appearing on your form where the result of your expression would normally appear. The first line of the INT expression should be set up as follows:

• Each expression is always contained within a pair of double "curly" brackets {{  }}
• There should be a space between the first instance of INT and the last bracket
• Variables you are using are case sensitive.
• Always close each INT operation with brackets ( )

What's different about INT over some of the other functions is that INT can be used in conjunction with other functions. For example, using the AVG Function, if we want to calculate the average of 3 values, should that value return a floating point, INT can be used to ensure the value is a whole number.