How do I convert numeric text (or a number in a Textbox field) to a number so I can use it in calculations?

You can create a Textbox field that only accepts numbers using the Format validation option set to the Numeric option. Or, you can use the Custom Mask option with #### as the Format Mask.

To convert this numeric value to a number:

  1. Add a Calculation field set to the Number type – with zero decimals.

  2. Set the calculation to: =int32.parse(Text) Make sure to replace ‘Text’ with the name of the Textbox field on your form.

  3. The Calculation field will automatically convert the numeric value from the Textbox field into a number.

You can then use this number in calculations.

Learn more in our Numeric calculations help guide.