Rowcode in a linked single-select question

I have a single-select question that is linked to a roster. This roster has names of household members, so in the single-select question appears those names. No problem so far.

That single-select question returns a RosterVector value, but I need to create a string varible with the name selected in that question and another integer variable with the rowcode, is it possible to do that?

Thanks a lot.

Luis, this is possible. However, probably not necessary:

The value of a question would be a code of the person, which you can utilize to branch accordingly in logical conditions. If you mention the same question in text substitution the Survey Solutions automatically substitutes in the name of the person.

We export values, so the code of the person will be found in the export file. Based on this code one can lookup the originally entered name in the source of the linked question (that roster it is linked to).

Exporting both would be a redundant situation. Why do you need both??

Best, Sergiy

I have a problem when data export, in a roster i have cod person is 1,2,3 but when i use a linked singled-select question, I selected item 2 and 3, but when I see the data export the item select is 1 and 2


in the exported data you will find the code of the selected person.

Your problem description is not sufficient to help you. Use the demo server: to create a minimal example that can demonstrate the problem.

Best, Sergiy

Following on this… You were right! The string variable is not necessary, and what I want to do is:

I have a single-select question that is linked to a roster of household members, so the names of the people appears as options. Interviewers select one of the members. After that, I have another roster filled with the same people, but I want to exlude from this last roster the person that were selected in the single-select question.

Put a condition on the second roster excluding the rowcode of the selected person.

How do I get the rowcode of the person selected in the single-select question?

The single-select question returns a RosterVector value when I try to use it in the condition of the second roster:

@rowcode =! jefe

Where “jefe” is the name of the variable of the single-select question.

That triggered a compilation error: Operator “=!” cannot be applied to operands of type “int” and “RosterVector”

Most likely you’ve meant:
@rowcode != jefe[0]


Many thanks!!