Record answer for skipped (non-relevant) question

More
5 months 3 weeks ago #153342 by AllesMeins
AllesMeins created the topic: Record answer for skipped (non-relevant) question
I need to build a survey that lets the user first select a number of choices and than asks for the preffered choice of the selected:
Q01: What fruits do you eat? (multiple choice)
Q02: Which is your favourite? (single choice of the previously selected)

Of course Q02 is only relevant, if the user has selected more than one answer in the first question. So if the user selects only one fruit, I want to record this fruit as his favourite (=copy the answer from Q01 to Q02) and don't bother him with a Q02 that has only one option.

I've managed the "skip Q02 if there is only one choice"-part, but I'm lost on how to automatically store it as the users favorite fruit. Can anybody help me with that?

Please Log in to join the conversation.

More
5 months 3 weeks ago #153366 by tpartner
tpartner replied the topic: Record answer for skipped (non-relevant) question
You cannot store data in a question that is hidden via relevance.

Having said that, it seems to me that if the respondent only picks one item in Q1, you already know their favorite.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 months 3 weeks ago #153382 by AllesMeins
AllesMeins replied the topic: Record answer for skipped (non-relevant) question
Thanks for your reply. Yes, if he only picks one I know his favourite. But how do I record that correctly, so that in the end I've all favourites in one result?

Lets say lemon-lovers hate all other fruit and only pick "lemon" in Q1. So lemon will never show up in Q2. How can I put the data together so that I end up with one "favourite"-stat including the values from Q2 and the single-picks from Q1?

Please Log in to join the conversation.

More
5 months 3 weeks ago #153393 by tpartner
tpartner replied the topic: Record answer for skipped (non-relevant) question
I would think that would be fairly simple to do in post-survey analysis but, if you need it explicitly declared in the data, you could use the Expression Manager assignment operator to load a hidden equation type question with that value.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Please Log in to join the conversation.

More
5 months 3 weeks ago #153430 by AllesMeins
AllesMeins replied the topic: Record answer for skipped (non-relevant) question
Since I'm unfortunatly not involved in the analysis I want to make it as idiot-proof as possible, so I'm going to try my luck with the Expression Manager :-)

Is there a fast way to "translate" from the multiple choice to a single-value? What I could do is use a lot of ifs (something like: if(Q01_SQ01,Q02='SQ01')...if(Q01_SQ12,Q02='SQ12')) but maybe there is a more elegant solution - some kind of "give me the name of the selected subvalues"?

Please Log in to join the conversation.

More
5 months 3 weeks ago - 5 months 3 weeks ago #153431 by tpartner
tpartner replied the topic: Record answer for skipped (non-relevant) question
No, sadly there is no EM variable for all selected items in a multi-choice.

So, I imagine your expression would look something like this (line-breaks inserted for clarity):
{equation1 = (if(count(that.Q1) > 1, Q2.shown, 
	if(Q1_1 == 'Y', Q1_1.shown, 
		if(Q1_2 == 'Y', Q1_2.shown, 
			if(Q1_3 == 'Y', Q1_3.shown, 
				if(Q1_4 == 'Y', Q1_4.shown, ''
))))))}

Note that it is advised to place the equation question in a group following Q1 and Q2.

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last Edit: 5 months 3 weeks ago by tpartner.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now