Generate a random number using a previously generated random number? | XM Community
Skip to main content
Hey there! I am trying to generate a set of random numbers in a survey. I am using the embedded data so that I can store the random numbers because I will need them for analysis. I generate the first one as follows:



Number1 = ${rand://float/0:50}



And I am embedding this number into a question. Then I want to ask a question that calls a random number in the range of 0 to Number1. Something like this:



Number2 = ${rand://float/0:${e://Field/Number1}}



but all I get out when I call Number2 is '}'



Any thoughts? Thanks!
@jasonmaier,



You can't nest piped text, which means you can't make a Qualtrics rand pipe dynamic. You'll probably have to calculate Number2 in JavaScript.
Tom,



Thanks for replying. I figure out a way to do it. You can use piped text in Qualtrics web services as a query parameter. Seems a little long form, but a satisfactory work around. Thanks again.

Leave a Reply