I've tried working at it some more and have created a button that shows the sum of the two tables, however it won't work unless I go to the next page and then back to the page with the buttonQualtrics.SurveyEngine.addOnload(function(){ var p1 = "${q://QID4/TotalSum}"; var p2 = "${q://QID10/TotalSum}"; document.getElementById("myBtn").addEventListener("click", function() { myFunction(p1,p2);});function myFunction(a,b) { var result = Number(a)+Number(b); document.getElementById("demo").innerHTML = result;}});If anyone knows how to make so that clicking the button will give the total result, that'd be much appreciated.
I'm most likely not going about this in the best way possible, but here's what I've attempted so far. I was able to develop a table where I could input the numbers and it would automatically give me the sumQualtrics.SurveyEngine.addOnload(function(){ jQuery('#textthree').keyup(function(){ var textone; var texttwo; var textthree; textone = parseFloat(jQuery('#textone').val()); texttwo = parseFloat(jQuery('#texttwo').val()); textthree = parseFloat(jQuery('#textthree').val()); var result = textone + texttwo + textthree; jQuery('#result').val(result.toFixed(2)); });});Where my html code was1234However I've realized that the data here wasn't captured in my data & analysisI tried replicating the first code using a constant sum question, and I assume my piped values (${q://QID4/ChoiceNumericEntryValue/1}, ${q://QID4/ChoiceNumericEntryValue/2}, ${q://QID4/ChoiceNumericEntryValue/3}) would respectively replace ‘#textone’ ‘#texttwo’ ‘#textthree’ how
When I change the complete_url to that, I end up at this page Here's the data record that I get back though I feel like the issue may lie with the link they've provided me
This is how I have it set, and the values I get. I've set it up identical to yours, but still only get the Cortex_ID. I don't know if the issue is with the link they sent me, because I'm able to retrieve the values they want. However, I've been told that other people have indeed received the same links and had it work.
Thanks for the instructions. I tried the above using the variables Resp_ID, Cortex_ID, and Proj_ID for the embedded data and got this https://puu.sh/FsUT0/b8dbcf39c4.png. I then tried changing the variables to id, Cortex_ID, and pid for the embedded data and got this https://puu.sh/FsUVe/b9280dc2b1.png.Neither of them could send the id or pid.
Thanks for the feedback. I implemented the Q_URL and when I look at the data I got the following screenshot https://puu.sh/FsT7w/b385958d21.png, so from this, the id and pid variables are not correct, is that right?Sorry I'm fairly new to this, but how do I go about creating said variable, I've gotten to this page https://puu.sh/FsTrx/d74c4488e8.png, but I'm not sure if that's where I want to be. Also, where would I pipe it into the the end of survey block https://puu.sh/FsTjx/8a8d1b6baf.png, would I add a new element before the end of survey. I'm very sorry if these are basic questions, but I had to learn this overnight due to our previous platform being incompatible with redirects.Again, thanks for any help you can provide
From what I've been told it's Resp_ID, Cortex_ID and Proj_ID. I've tried setting the embedded data at the start to match that, but still have had no luck, where they are only receiving the Cortex_ID.
Already have an account? Login
Enter your username or 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.