Randomly Selecting One Option by default - Not working

Hi,

I am trying to randomly select one option (Yes or No) in select-one type
question. I have created the random calculation but I am not able to select
one option based on this calculation.

Also the following calculation is generating 3 numbers(0, 1, 2) while it
should generate only 2 (0 and 1):

once(concat( round((random() * 1000) mod 2 , " ")))

Please check the attached files and let me know what I am doing wrong.

Thank you.

random_select.xml (1.53 KB)

random_select.xls (5.5 KB)

··· - Shobhit

Hi,

I have fixed the incorrect random numbers generation problem. The correct
formula should be:

once(concat(( round(random() * 100, 0) mod 2 ), " "))

Please help me select one option be default according to the generated
number.

Thank you.

··· On Monday, 11 May 2015 17:16:07 UTC+5:30, Shobhit Prabhakar wrote: > > Hi, > > I am trying to randomly select one option (Yes or No) in select-one type > question. I have created the random calculation but I am not able to select > one option based on this calculation. > > Also the following calculation is generating 3 numbers(0, 1, 2) while it > should generate only 2 (0 and 1): > > once(concat( round((random() * 1000) mod 2 , " "))) > > Please check the attached files and let me know what I am doing wrong. > > Thank you. > > - > Shobhit >

3 posts were split to a new topic: How can I set a default value for a question?