Elegant way to show branch logic based on a matching text responses. | XM Community
Solved

Elegant way to show branch logic based on a matching text responses.

  • 28 October 2020
  • 4 replies
  • 93 views

Userlevel 2
Badge

I have a text response question where participants input a string for their ID. I have several lists of 50 participants who should take a different branch of the survey than everyone else.
I am considering using a branch based on a regex match. For example if 3 of the 50 participants ID's were `XXX`, `YYY`, and `ZZZ`, I could do something like `if XXX|YYY|ZZZ then...` but I don't know how scalable this will be because Qualtrics tends to limit the text input you can have inside of boxes.

Alternatively, I think I could do this fairly easily by collapsing an array in JS, but I'm not sure if that's going to be the best way either.

icon

Best answer by Radam 28 October 2020, 19:53

View original

4 replies

Userlevel 5
Badge +30

In the user list can you add a flag or data value indicating what user should see what branch and then either use the respondent info or embedded data for the logic to show/hide different branches?
You could also use the user ID as an authenticator?

Userlevel 2
Badge

In the user list can you add a flag or data value indicating what user should see what branch and then either use the respondent info or embedded data for the logic to show/hide different branches?

Yes I'm not sure how to best do that using the respondent info to setup the logic. There are a lot of people to direct into several branches.

You could also use the user ID as an authenticator?
This might be a really good idea, can you tell me more about what you're thinking?

Userlevel 5
Badge +30

I'll start with the authenticator to help with my flag logic.
If you have the user list and each has a unique UID, you can use the authentication to grant access to the survey based on the UID. Then you can create embedded data fields for the "flags" in the users contact fields.
For example UID A1A need to see block 3.
I'd add a authenticator to validate user and an embedded data file matching the name of the contact list field for visible blocks in the survey flow.
After authentication I add the the survey logic to see if visible_blocks = 3, if yes display the block.

Haven't tested by it should work...
Here is the documentation on authenticator which also discussed embedded data: https://www.qualtrics.com/support/survey-platform/survey-module/survey-flow/advanced-elements/authenticator/authenticator-overview/

Userlevel 2
Badge

I started experimenting with the authenticator -- it seems like participants are required to have an email address to upload contact lists?
Also the authenticator page doesn't seem like it is customizable (at least not without writing my own html) -- it is possible to authenticate based on an existing text entry question?


EDIT: It looks like I can sidestep the email problem using an input called ExternalDataReference and I can sidestep using the Authenticator's "Prefill" option

Leave a Reply