Welcome to the LimeSurvey Community Forum

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

How to Store values in Hidden Question

  • burhandodhy
  • burhandodhy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #129162 by burhandodhy
How to Store values in Hidden Question was created by burhandodhy
Hi , i have situation where 5 (A1 - A5) yes no question and one question (A6) which is hidden , i check if 2 or more question are yes than store 1 in hidden question that is A6 ...

I already use this condition sum(A1 == 'Y',A2 == 'Y',A3 == 'Y', A4 == 'Y', A5 == 'Y') > 1 ... now store 1 in question A6 ..

thanks in advance ;)
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #129164 by tpartner
Replied by tpartner on topic How to Store values in Hidden Question
Have a look at the Expression Manager Assignment Operator - www.limesurvey.org/manual/Expression_Man..._Assignment_Operator .

Assuming A6 is a short-text or numeric question, you can insert an equation question AFTER A6 with this value:
Code:
{A6 = if(sum(A1 == 'Y',A2 == 'Y', A3 == 'Y', A4 == 'Y', A5 == 'Y') > 1, '1', '')}

Note that A6 will only be set when the page is submitted.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • burhandodhy
  • burhandodhy's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
8 years 10 months ago #129165 by burhandodhy
Replied by burhandodhy on topic How to Store values in Hidden Question
i apply this condition but nothing happens , the value are not store in A6
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
8 years 10 months ago #129167 by tpartner
Replied by tpartner on topic How to Store values in Hidden Question
Working survey attached:

File Attachment:

File Name: limesurvey...3564.lss
File Size:17 KB

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: burhandodhy
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose