Numerical Value Validation for Multiple Choice Question

More
2 weeks 4 days ago #177418 by HalloHans
HalloHans created the topic: Numerical Value Validation for Multiple Choice Question
Hi,

I am new to the forum and have a question, any help is greatly appreciated.

I am trying to include a question for allocating respondents' budgets.

They should be able to pick several items out of a list but should consider the items' prices, meaning the items having different prices and the total price of selected items must not be higher than the respondents' fixed budget.

I am not sure whether I could do that by using equations or assesements. Can someone share their ideas on how to implement that type of question? Thank you very much in advance.

Best,
Hans

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

More
2 weeks 3 days ago #177439 by tpartner
tpartner replied the topic: Numerical Value Validation for Multiple Choice Question
You can use the Expression Manager sum() function - manual.limesurvey.org/Expression_Manager#Implemented_Functions

So, in the question depicted below, the validation equation could be something like:

sum(if(Q1_SQ001 == 'Y', 30, 0), if(Q1_SQ002 == 'Y', 40, 0), if(Q1_SQ003 == 'Y', 70, 0), if(Q1_SQ004 == 'Y', 80, 0)) <= 120



Sample survey attached:

File Attachment:

File Name: limesurvey...1-27.lss
File Size:20 KB

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

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

More
2 weeks 3 days ago #177445 by HalloHans
HalloHans replied the topic: Numerical Value Validation for Multiple Choice Question
Hi Tony,

thank you so much. That's exactly what I was looking for.

Best;
Hans

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!