Yimi
November 26, 2021, 3:40pm
1
Buen día estimada comunidad.
Solicito su valioso apoyo, tengo un campo numérico (string) y deseo que el valor de este campo no pueda ser cero (0) y que tampoco pueda colocarse como cero al inicio (cero a la izquierda), por ejemplo: 023564.
Gracias por su ayuda.
Kal_Lam
November 27, 2021, 7:41am
2
@Yimi , you could do it as outlined in the post discussed previously:
Have you tried this:
In the survey tab of your xlsform:
[image]
It should solve your issue (i.e. users are only allowed to enter 3 digits from 001 to 999).
Reference xlsform:
Regex_Constraint.xlsx (10.0 KB)
If you are still facing an issue, please share with us a screenshot of the issue. The community would love to help you solve your issue.
Note: if you wish to have the numbers between 000 to 999 you could simply change the regex code to (regex(., '^[001-999]{3}$') and (. >= 000))