I am new to using survey 123 so I apologize for the question. I want to set it so only one decimal place can be entered when the field teams fill in the form. Is there a formula so I can do this.
thank you in advance
Hi! I suggest you try the inputMask column in your XLSForm. You can find info about inputMaks in this help topic. It looks like a value of 9.9 in your inputmask would do the trick.
The input mask controls user input as values are entered in the input box. Incorrect values are shown in red, but once you have a value that matches the mask it will switch to black.
Another approach is to use a regular expression in the constraint column.
By the way! Once you can spell Survey123 without a space between Survey and 123, you qualify as a Survey123 Ninja.
What about specifying the scale on a decimal for calculated values. inputMask seems to only work when you know the precision and scale, like a percent (99.9%). I need to show 1 place past decimal even if it is 0; .1, 1.0 or 200.0 needs to be allowed. The round function knocks off the 0, but I need to show scale of 1 no matter.
I have this question too. I want to restrict the users to one decimal place but let the user input something like 30.3 or 3.1 without having to write 03.1, because the survey users won't know what the precision and scale is. Has anyone ever found a work around to this?
Ismael Chivite What do you mean above by putting a regular expression in the constraint column? Would we have to put in all the possibilities such as 0.1, 0.2, 0.3............99.9 etc?
You could restrict users to one decimal place using a regular expression in the constraint column.
This regular expression, for example, allows the user to input between 1 and 10 numbers before the decimal, and 1 after:
This page has some details and examples dealing with regular expressions:
Formulas—Survey123 for ArcGIS | ArcGIS
That is a great idea, thank you!
Retrieving data ...