HOW TO
In ArcGIS Survey123 Connect, survey responses can be constrained to a specific number of decimal places. This constraint ensures consistent data entry and compatibility with analysis and reporting formats.
This article describes the workflow to limit the number of decimal places in survey responses in ArcGIS Survey123 Connect. To demonstrate the workflow, the survey inputs for height measurements in meters are limited to two decimal places, such as 1.75.
regex(., '^[0-9]+\.\d{<decimal_places>}$')'
The following is an example of the expression to limit the input values to two decimal places.
regex(., '^[0-9]+\.\d{2}$')
The decimal question type does not accept trailing zeros, such as 1.20, as valid input. As a workaround, use the following expression to allow numbers with trailing zeros after the decimal point. Replace <minimum_digit> and <maximum_digit> with the minimum and maximum number of digits allowed after the decimal point.
regex(.,'^\d+(\.\d{<minimum_digit>,<maximum_digit>})?$')
The following is an example of the expression to allow a minimum of one and a maximum of two digits after the decimal point.
regex(.,'^\d+(\.\d{1,2})?$')
The survey below shows the "Invalid" error message returned when the response is not within the specified decimal format.
Article ID: 000033866
Get help from ArcGIS experts
Download the Esri Support App