Welcome to the LimeSurvey Community Forum

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

Overwrite or replace numercial input

  • questioneer
  • questioneer's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 2 months ago #234934 by questioneer
Overwrite or replace numercial input was created by questioneer
Please help us help you and fill where relevant:
Your LimeSurvey version: 5.4.12
Own server or LimeSurvey hosting: LimeSurvey hosting
Survey theme/template: fruity
==================
Dear all,
I have been searching but did not find an answer. I use numerical input and multiple numerical input questions. I want the input there to be replaced or ovwerwirtten by a certain value if in a later single or multiple choice question a certain selection is made (e.g. replace numerical input by 9999 if a certain seslection is made. I tried to solve this with an equation question (e.g. {Q01.NAOK=if(Q02_SQ001=="AO01",9999,)} which is placed at the end of the question group but it does not work. Any idea what I am doing wrong?
Best regards

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Away
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
2 years 2 months ago #234951 by Joffm
Replied by Joffm on topic Overwrite or replace numercial input
Hi,
Your idea is correct, but
{Q01.NAOK=if(Q02_SQ001=="AO01",9999,)}
If you entered it as you displayed here you should see an error message.

And you do not define what happens if Q2_SQ001 is NOT "AO01". There is the missing FALSE part in your IF function.
Like {Q01.NAOK=if(Q02_SQ001=="AO01",9999,Q01)}

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: DenisChenu

Please Log in to join the conversation.

  • questioneer
  • questioneer's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
2 years 2 months ago #235438 by questioneer
Replied by questioneer on topic Overwrite or replace numercial input
Thank you so much. Sometimes it´s only little things missing. I thougt the FALSE part could remain empty, meaning "no change" but this was not correct. However, it seems not work with ".NAOK" in the end. It only works if I delete .NAOK. Any idea why? I just wonder.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose