Question

I am currently designing a Google Form for research data collection, and I need to find a way to display a random number from 1 to 4 on the screen for random subject assignment (subjects then select this randomly generated number, which brings them to the correct pages for their study condition (I've already figured that part out)). I am completely new to any form of programming, so any hand holding is extremely appreciated. All I need to do is display a random number from 1 to 4. This number doesn't need to be saved for later, it just needs to show up one time.

Was it helpful?

Solution

Im not going to claim to be a google form master, but I know form and spreadsheet can connect, so storing your data there and feeding it into your form would be a decent way to go. That in conjunction with a random number API like:

http://www.random.org/integers/?num=1&min=1&max=4&col=1&base=10&format=plain&rnd=new

and you should be good to go. Slam the above URL into an =importData() cell into a spreadsheet and reference it. This solution comes with a caveat, the google form data update frequency is low, theres a hack to get around it if it is an issue, but for your single user form scenario I imagine you should be good to go.

Here is the exact cell data incase you get hung up:

=importData("http://www.random.org/integers/?num=1&min=1&max=4&col=1&base=10&format=plain&rnd=new")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top