Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Can I INSERTAN a value from Other (please, sepecify) text field?

  • kachne
  • kachne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #95151 by kachne
Hello.

In my survey, I am asking for a game title and I have a List (Radio) type of question that has a number (5) of answers + an option "other" with mandatory text input (Q01). In the following question (Q02), I would like to ask about the one selected title using INSERTAN. It works perfectly for the pre-defined answers, but when the respondents selects "other" and fills the text, only string "-oth-" is inserted in the wording of Q02 (and that makes the question meaningless).

Is there a way how to insert the content of the text field into the wording of Q02? Please note that it is not a comment filed. I assume I should use some conditioning as

{if(Q01_a == "Y" || Q01_b == "Y" || Q01_c == "Y" || Q01_d == "Y" || Q01_e == "Y" ISERTAN:Q01) && if(Q01_?? == "Y" INSERTAN:Q01_??_??)}

but I am not sure what would be the SGQA code for the option other and for the linked text filed.

Any hints? Many thanks in advance.
Katerina.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 years 11 months ago #95154 by tpartner
If the Q01 answer codes are "a", "b", "c", "d" and "e", then the equation for the inserted text would be:
Code:
{if(Q01.code == 'a' OR Q01.code == 'b' OR Q01.code == 'c' OR Q01.code == 'd' OR Q01.code == 'e', Q01.shown, Q01_other.shown)}

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: kachne, ecoplan
The topic has been locked.
  • kachne
  • kachne's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 years 11 months ago #95172 by kachne
Thanks a lot! It works! :)
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose