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

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

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?- 2 people found this helpful
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:

regex(., '^[0-9]{1,10}\.[0-9]{1}$')

This page has some details and examples dealing with regular expressions:

Hello. I tried entering the regular expression above in the Constraint field and it doesn't seem to work. The Type field is set to decimal. I'm trying to have the users enter a value from 0 to 99 and include 1 decimal place only. I've also entered 99.9 in the Input Mask field, but that forces the users to enter a leading 0 for values less then 10. Any help would be appreciated.

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.