I have a survey with control and treatment questions and I need to randomly assign 50% of my respondents to each group. After some (unsuccessful) attempts myself I found some code in another forum thread (https://groups.google.com/forum/#!topic/opendatakit/DtOpSBaHa8I). Code I am using is: concat(( round(once(random()) * 100, 0) mod 2 ), " ") and then I am filtering using the relevant column: rand = 1 and rand = 0 for control and treatment respectively.
Seemed to be working ok at first when I tested it a few times and it was giving different results, but after about 250 surveys collected my assistants mentioned that they kept seeing the control question more times than the treatment, and I checked and I have 140 control and 90 treatment results. I am stuck and I would be so grateful for any help with fixing this, or suggestions for a new way of randomising.
I am using ODK collect v1.12.2 on Google Nexus 7 tablets Android version 4.3.