How to Store values in Hidden Question

More
4 years 1 month ago #129162 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 ;)

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
4 years 1 month ago #129164 by tpartner
Have a look at the Expression Manager Assignment Operator - manual.limesurvey.org/Expression_Manager..._Assignment_Operator .

Assuming A6 is a short-text or numeric question, you can insert an equation question AFTER A6 with this value:
{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.
Official LimeSurvey Partner - partnersurveys.com

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #129165 by burhandodhy
i apply this condition but nothing happens , the value are not store in A6

Please Log in or Create an account to join the conversation.

More
4 years 1 month ago #129167 by tpartner
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.
Official LimeSurvey Partner - partnersurveys.com
Attachments:
The following user(s) said Thank You: burhandodhy

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!