Just a short update! I managed to get it to work at last, turned out I did not paste the code in the right location to get it to load before I needed to call the embedded data. Thanks very much for your help!
https://www.qualtrics.com/community/discussion/comment/32079#Comment_32079Thank you so much for your help! I attempted to do this with the following code:Qualtrics.SurveyEngine.addOnload(function(){ // Get the embedded data as an integer var upperlimit = parseInt("${q://QID1/ChoiceTextEntryValue}"); var multipliedlimit = upperlimit * 3; console.log(upperlimit); console.log(multipliedlimit); // Use upper limit as a floor for generating a random number var newtransfer = Math.floor(Math.random() * (multipliedlimit));// Save newtransfer to embedded data Qualtrics.SurveyEngine.setEmbeddedData("newtransfer", newtransfer);});But the values were not shown on Qualtrics. Could it be that I messed up the syntax somewhere?
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.