Welcome to the LimeSurvey Community Forum

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

Dynamic maximum answers

  • pk2005
  • pk2005's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 6 months ago #112561 by pk2005
Dynamic maximum answers was created 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.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 6 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.
  • pk2005
  • pk2005's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
9 years 6 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.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 6 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 :
manual.limesurvey.org/Question_type_-_Ar...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 service on demand , plugin development .
I don't answer to private message.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose