@Tom_1842 That seemed to work - thank you so much!
HI @Tom_1842 -I know it’s been a bit since this was posted, but I was able to use it to disable the prompt - thank you! However, I am now sometimes encountering the issue that when a user clicks the back button, there is an endless spinning wheel - and it never goes back to the former page. Any idea how to trouble shoot this? Many thanks in advance!
Thanks @TomG - in the end it was starting at 0. This is the solution applied to another shorter question: const choices = this.getChoices();const answers = this.getAnswers(); if ("${e://Field/ESGFirm}".includes("Yes")) this.setChoiceValue(choices[0],answers[0],true); if ("${e://Field/ESGFirm}".includes("No")) this.setChoiceValue(choices[0],answers[1],true); if ("${e://Field/ESGPortfolio}".includes("Yes")) this.setChoiceValue(choices[1],answers[0],true); if ("${e://Field/ESGPortfolio}".includes("No")) this.setChoiceValue(choices[1],answers[1],true);
Thanks @ahmedA - so would it be like this? const choices = this.getChoices();const answers = this.getAnswers(); if ("${e://Field/ESGFirm}".includes("Yes")) this.setChoiceValue(choices[0],answers[0],true); if ("${e://Field/ESGFirm}".includes("No")) this.setChoiceValue(choices[0],answers[1],true); if ("${e://Field/ESGPortfolio}".includes("Yes")) this.setChoiceValue(choices[1],answers[0],true); if ("${e://Field/ESGPortfolio}".includes("No")) this.setChoiceValue(choices[1],answers[1],true);Also, according to all reading I’ve done and convos with Qualtrics support themselves, they don’t offer this level of functionality? You can preset written answer options or a constant multiple choice/matrix selection, but if you want it to vary based on embedded data, my research and what I’ve been told is that I have to use JavaScript - if there is another option, would be great though!
Hi @TomG - thank you! Can you point me where I can find access to developer tools? I cant seem to locate where that would be!
Hey @TomG - thanks! When using const choices, it starts at 0 - at least it does so with my multiple choice options. However, I tried starting at 1 and still no luck. Any other ideas?
Thanks @TomG - I tried that but am not having luck. See below for code and a simpler question this time. Any tips? const choices = this.getChoices(); if ("${e://Field/ESGFirm}".includes("Yes")) this.setChoiceValue(0,0,true); if ("${e://Field/ESGFirm}".includes("No")) this.setChoiceValue(0,1,true); if ("${e://Field/ESGPortfolio}".includes("Yes")) this.setChoiceValue(1,0,true); if ("${e://Field/ESGPortfolio}".includes("No")) this.setChoiceValue(1,1,true);
Also, does case matter?
Thanks @ahmedA! That seems to have worked! Am I right in understanding the choice numbers do not restart at 1 for later questions, then? Just trying to understand what it means by “choice numbers getting out of hand.” Will this same code work for all 15 or so questions I need to use it on?Really appreciate your help!
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.