Random number within embedded data field? | XM Community
Skip to main content

Hi,
I generate a random number as a embedded data field (${e://Field/rd_nr1}). I now want to use this number within another embedded data field and i tried:  ${e://Field/'{e://Field/rd_nr1}'.body}, which does not work. How can I use an embedded data field within an embedded data field?

Background: I have a json with 400 elements. Each respondent should randomly receive one of these elements. That is, my random number field takes values from 1 to 400 which should then be used to retrieve the respective element of the json file (which i inputed via the web service).
Thanks for your help!

Assign the value of random number to one embedded variable which u can use it.
Ex: random_number=(${e://Field/rd_nr1})
Then you can use (${e://Field/random_number}) this to show random value


Leave a Reply