Welcome to the LimeSurvey Community Forum

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

Dynamic maximum answers

More
10 years 11 months ago #112561 by pk2005
Hello,

Is it possible to limit the number of maximum answers to one question based on the number of selections from a previous questions.

For example if options selected in Q1 are 3 then in Q2 the maximum answers are at most 4.

Peter
The topic has been locked.
More
10 years 11 months ago #112563 by tpartner
Replied by tpartner on topic Dynamic maximum answers
Try this as the question validation equation for Q2:

Code:
count(self) <= (count(that.Q1) + 1)

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: pk2005
The topic has been locked.
More
10 years 11 months ago #112635 by pk2005
Replied by pk2005 on topic Dynamic maximum answers
Thanks Tony,

It did not work but actually gave me another idea.

I put this: 4-(count(that.Q1) at the maximum answers of Q2 which achieved the result. What I wanted was the combined selections of Q1 and Q2 to be 4 (Q1 had 3 options).

Thanks a lot for your help.

Peter
The topic has been locked.
More
10 years 11 months ago #112643 by DenisChenu
Replied by DenisChenu on topic Dynamic maximum answers
Hi,

You can use Expression Manager in Advanced settings / ma_anser too :
www.limesurvey.org/manual/Question_type_...rs_.28max_answers.29

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose