Creating embedded data field for multiple variables | XM Community
Skip to main content

Hi newbie here
I have a list of 420 postcodes in a survey drop down and want to create a hidden/embedded variable to allocate respondents into 7 different regions depending on their answer to the postcode.
The only way I see currently is to go into survey flow and one by one allocate these postcodes to each region - however this would mean i would need to do this 420 times!
I spoke to Qualtrics directly who dont have an answer on how best to do this. This seems like a simple request so hoping someone on here has a better solution.
Thanks
Ed

We will use recode value in this method.
Arrange/group the postal codes with respect to regions i.e. for example from choice 1 to choice 90 is region A, then from choice 91 to choice 150 is region B and so on.
Now after this question in the survey flow, pipe the selected recode value in an embedded data and then add a branch logic to check the range in which this embedded data is and assign the region accordingly. So by this method, we need only 7 branch logic.


Hi Rondev
Thanks for taking the time to comment.
2 follow up questions:
-Currently when I recode the values I need to do this 1 by 1 in the survey. Therefore in your example above I need to recode 1-90 as A. Is there a shortcut on this?
-In the survey flow how do I select recode value rather than original variable? I currently use the set value, insert piped text, survey question. At the moment I only see the original postcode value despite recoding some values?

Thanks again
Ed


  1. Create a CSV file with a column, and put the postal code grouped with respect to region i.e. first region A postal code, then B and so on

  2. Create new multi choice question in qualtrics

  3. Copy the column (do not copy empty rows) and paste it in the first choice of the new created multi choice question

  4. Just confirm if all the choices are created and check if the recode values are in serial order. Then, just make that question to drop down type

  5. After this question in survey flow create an embedded data "PostalCodeRecode" and in set value follow this path - insert pipe text -> survey question -> select that new multichoice question -> selected choices recode.

  6. After this embedded data, add a branch logic to check the range in which this embedded data "PostalCodeRecode" is and assign the region accordingly.



There are few options available.

  1. Supplemental Data - This feature is not fully launched however can help to lookup region code from postal code values entered.

  2. Using Autocomplete feature - Autocomplete features allows you to column value which you want to store.

  3. Using Drill Down - Using Drill down, you can pass Region code in different column. So basically you will create Drill down with 2 options - a) Postal code and b) Region code. Then you will have to hide Region option by using simple CSS functionality

  4. Using JS custom code, you can easily handle punching of region code in separate embedded fields

Incase you need any additional details, please let me know.

Thank you!


Leave a Reply