Multiple attributes / multiple choice as a filter | XM Community

Multiple attributes / multiple choice as a filter

  • 2 April 2019
  • 4 replies
  • 69 views

Userlevel 7
Badge +23
  • Level 5 ●●●●●
  • 449 replies
Hi guys, I somehow cannot figure out the solution.
I have a bunch of respondents who will have several values in the same field in the contact list. For example, we want to ask people about their travel experience in the past year. we know that person A visited 5 countries, person B-3 countries and person C only 1. We store country names in the contact list, let's say that there are 300 respondents and a list of 50 countries in total. In the survey we want to ask the respondents set of questions about each of the visited countries separately, specifying the country in the question text. For example:
Q1: Did you enjoy visiting "Country 1"?
Q2: Did you go sightseeing in "Country 1"?

Same set of questions for each of the country this person has visited according to our data. So Person A will see 5 sets of questions, person B-3 sets of questions and Person C-only 1.

What is the best way to set it up keeping in mind that we would want to have a report/dashboard with the possibility to filter the results per each country separately?

Thank you in advance!

4 replies

Userlevel 7
Badge +11
Hi @MsIreen! When you say you store the country names in the contact list, how do you store them? Is it a field for each country with a yes/no stored? Or is it a single list with multiple countries in a list for each contact?

I can think of a few ways to do this but it depends on how your data is structured to begin with.
Userlevel 7
Badge +23
Hi @jpardicusick, At the moment we have it in a single list. But i would also love to hear your ideas on the other setup, as it may be worth considering to change the current setup.

Thank you so very much in advance!
Userlevel 7
Badge +11
@MsIreen Gotcha! There's probably more than a few ways to do this, and I might beg the community for some custom code because any way I can think of has you doing at least 50 branches to check for each country.

Here's the best way I can think of doing it:
* Include a field that contains the count of the countries visited and append it as the first question answer to the survey
* Use display logic to only present the first question if it isn't answered
* At the beginning of the flow, declare Country1, Country2, Country3 in a branch based on how many countries there are. IE if CountryNumber is 1, then declare Country1, or if CountryNumber is 2, then declare Country1, Country2, etc.
* Branch for each country to check if the single field contains the country and if so, fills (IE if CountriesVisited contains Canada AND Country1 is empty, then Country1 is Canada
* Create a Loop and Merge for your repeatable questions, based on a number (which will be CountryNumber)
* Create the loop and merge fields using your Country1 Country2 embedded data fields and don't do random order

I haven't tried this myself but I feel like it should work!

Older thread, but I thought it could be worth responding.
Wouldn't a combination of piped text, and display/skip logic work here?
In my mind, the steps below should work, but I would love to learn more, in case I am missing something.

Let's say the maximum # of countries visited by any one individual was 5.
I would add the same questions about the countries 5 times. Each piping text from the metadata (countries in the contact list).
Then I would set a condition to skip to the end of the survey (or to additional questions, demographics, blocks, etc...) if all questions about the countries visited were answered, whether they were 3, 4, 5, etc...

This should be possible if you already have the countries they visited, right?
If unable to create the skip logic based only on the country columns in the metadata/contact list, another idea could be to precede the above steps with a "How many countries have you visited?" multiple-choice, and create the skip/display logic from these answer choices - e.g., if # of countries is 2, display questions number x and y; and so on... :)

Leave a Reply