Hello,
I'd like to build a conceptually simple eligibility check into a survey:
_IF respondent enters an account number that is present in pre-defined dataset
THEN show this question block
ELSE show that question block_
The authenticator seems perfect for this... except that authenticator fails get a failure message and the survey halts. Regardless of authenticator pass/fail, I want the respondent to continue the survey (I'll use their pass/fail status in logic to control what their next questions are).
Can the authenticator do this? Or is there a better approach?
Thanks for your ideas!
Page 1 / 1
Hi @NickVEIC,
I think you should use JavaScript for this. Check this after the user clicks the next button and send this information to an embedded data field. Then you can branch your survey according to the value of this field.
So your code should look somehow like this:
Qualtrics.SurveyEngine.addOnPageSubmit(function() //This code will be executed right after clicking the next button
{
var ids = ["2","4","6","8"]; //Your account numbers, note the parentheses
var qid_01_str = this.questionId; //Get ID of the actual question
var currentResponse = document.getElementById('QR~' + qid_01_str).value; // Get the actual value
var included = ids.includes(currentResponse); //Checks whether the value is in your array
Qualtrics.SurveyEngine.setEmbeddedData('included', included); //sends this information to survey flow
});
And your Survey flow like this:
!
I think you should use JavaScript for this. Check this after the user clicks the next button and send this information to an embedded data field. Then you can branch your survey according to the value of this field.
So your code should look somehow like this:
Qualtrics.SurveyEngine.addOnPageSubmit(function() //This code will be executed right after clicking the next button
{
var ids = ["2","4","6","8"]; //Your account numbers, note the parentheses
var qid_01_str = this.questionId; //Get ID of the actual question
var currentResponse = document.getElementById('QR~' + qid_01_str).value; // Get the actual value
var included = ids.includes(currentResponse); //Checks whether the value is in your array
Qualtrics.SurveyEngine.setEmbeddedData('included', included); //sends this information to survey flow
});
And your Survey flow like this:
!
I have a similar situation where I use an authenticator to pre-populate data for existing contacts, but also allow new contacts to complete the survey.
My authenticator is pre-filled from an initial "what is your id" question, and it is set to a maximum of 1 attempt. If they meet the authentication then their data is pulled from the contact list and pre-populated, if not they just see the questions as usual. They don't see the authenticator and no-one gets an error message.
One issue with this approach is that it doesn't give respondents an opportunity to correct their id (by presenting an error), but that's not a huge issue for us as both groups are directed to the same questions.
My authenticator is pre-filled from an initial "what is your id" question, and it is set to a maximum of 1 attempt. If they meet the authentication then their data is pulled from the contact list and pre-populated, if not they just see the questions as usual. They don't see the authenticator and no-one gets an error message.
One issue with this approach is that it doesn't give respondents an opportunity to correct their id (by presenting an error), but that's not a huge issue for us as both groups are directed to the same questions.
Leave a Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.