I am trying to code into a Survey123 form a work around for the lack of Captcha functionality but I am having issues with the display of the web browser version of the app. My work around involves generating a random number at the top of the form to use as a password at the bottom to complete submission. However, the random() function has 15 significant figures and I would prefer survey takers not have to deal with that large of number. When I use round() to reduce the length of the number it works for the Survey123 Connect app, but displays "NaN" in the web browser app.
Is there a way to take a calculated value like "round(random(),6))" and have it display as a value other than "NaN" in the web version of survey123?
Images 1 and 2 show the formula and output of one of the round() function related tries. Images 3 and 4 show the output when using only the "random()" function.
What is interfering with the proper display on the web version of Survey123?
Solved! Go to Solution.
Hi,
One way work with the random() in this context would be to multiply the value by number of digits you do want and then round() the number to make an integer:
round(random()*100000000,0)
for 8 digits as an example
Hi,
One way work with the random() in this context would be to multiply the value by number of digits you do want and then round() the number to make an integer:
round(random()*100000000,0)
for 8 digits as an example
Thank you - this advice solved the problem. My hacky CAPTCHA work around is now functional.