String from listed multi-select

Hello, I need your help.

I have a roster with a question to get names.
Later I have a multi-select question using this roster as a source.

I wish to take the names of the people chosen in the multi-select and put them in a variable.
How can I do that?

Thank you

@surveyccc
First, let me point out where I think your comfused. you have used a list question yet you want the roster source to me multi-sellect question. The type of roster question should relate with the trigger question in line with the data you want to collect.

Secondly, when you want to create a roster, figuring out the type of trigger question is important. In your case the trigger question type is List Question

Create a question asking the respondent to list the names. then create a roster using the list question above as the source.

Then create the subsequent questions appropriatly.

Use the links to read more on Rosters. Roster doc

Best @blessingskalua

Hello @surveyccc,

Let me see if I understand you correctly.

  1. You have a roster
  2. In this roster you have a text-type question. Lets call it NAMES.
  3. Outside of the roster you have a multi-select question. Lets call it ROSTER_NAMES.
  4. You want ROSTER_NAMES to list all names collected in NAMES as options

Is that correct?

Can you explain what are you trying to achieve with this? Say you have 200 names and you put them into a variable, what do you do with that page-long paragraph?

Sorry for not being clear, I’ll try to expand. The problem is the roster is numeric.

I have a numerical question that asks how many people live in the house.
I use this numeric question as the base for a roster where one of the questions is a text question asking the name of said people.
Later I have a multi-select question using this roster as base where some of those people will be chosen.

I wish to capture those names just to give more personalized messages. For example, to later ask ‘where did Ana and Bruno went last weekend?’ instead of ‘where did those people went last weekend?’.

I don’t expect 200 names but if I get too many maybe I can do ‘where did Ana and the others went last weekend?’

Hi @surveyccc ,

I am not sure if I understand the flow you explained. Are you asking questions about each household member that you define in the numeric roster?

Later I have a multi-select question using this roster as base where some of those people will be chosen.

Can you give an example of the criteria used to determine how “some” of those people are chosen? I ask because when you say:

For example, to later ask ‘where did Ana and Bruno went last weekend?’ instead of ‘where did those people went last weekend?’.

It leads me to believe that you can use a roster with a list-question trigger from the start, instead of the numeric roster. Listing household members is a very common use-case for list-type rosters. You could do something like the below:

  1. [A brief introduction. Eg: “I will now be listing the members of your household. Please start with the head or reference person and then list all other members from oldest to youngest”].
  2. Capture the names in a list-type question.
  3. Trigger a roster with the list-question as the source, where you ask your particular questions about each individual. Here you can use the syntax %rostertitle% to substitute the listed names into a question. Example: “How old is %rostertitle%?”. See below for further explanation and examples:
  1. Remember you can use the enabling conditions to apply your skip patterns and determine which questions get asked to who, based on your criteria.

Is this what you wanted to achieve?

I think that based on the explanation that @surveyccc has provided, it follows that she has discovered that the multiple-select categorical questions may not be used in text substitutions, but still wants to do this, and is looking for a workaround:

I would not advise this generically without knowing the context of your survey, and the example you are giving is likely an example only, not the actual use case. But it should be possible! If this is indeed what you’ve meant:

@giansib

It leads me to believe that you can use a roster with a list-question trigger from the start, instead of the numeric roster.

I could, and I will if I have to. But I was hoping there would be a way of using C that I couldn’t think of to get the desired result.

@sergiy
Yes, that is what I meant.




I made an example questionnaire to help clarify.
https://designer.mysurvey.solutions/questionnaire/details/fbe40080-64f7-4880-9c6d-91d536d6fc6d

I may have missed the explanation, but why not use a list-triggered roster. The list question would capture the names of members. The questions in the roster could mention the name of each member via text subsitution.

@surveyccc,

thank you for confirming the screenshot illustrates your goal indeed.
I have added a section Linked multi-select value substitution implementing this approach to the public example questionnaire.

As an exercise you/readers may want to try to:

  • actually do what you’ve described (display “A, B, and 7 others”) for the cases where a lot of items are selected;
  • display “all” when all are selected;
  • pose the question differently when there is only one person selected (“Was A born in this province?”);
  • show selected items in their list-order, not selection-order.

Best, Sergiy