Welcome to the LimeSurvey Community Forum

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

Conditional minimum value

More
3 years 9 months ago #221576 by ElysiaChlorotica
I am trying to set a conditional minimum value for a numerical input question, dependig on the number of selected answers of the previous multiple choice question.
The following approach does not work:

Minimum value set to
Code:
count(that.MultipleChoiceQuestion)
or
Question validation equation set to
Code:
this >= count(that.MultipleChoiceQuestion)

where
Code:
MultipleChoiceQuestion
is the question code of the previous question.
I have also tried to replace
Code:
this
with
Code:
self
, but it doesn't work either.

What am i missing?
It may be worth mentioning that the previous multiple choice question is not mandatory and can be skipped, which should result in a minimum value of 0 in the following numerical input question.
The topic has been locked.
More
3 years 9 months ago #221577 by Joffm
Replied by Joffm on topic Conditional minimum value
Hi,
I do not see any issue using 
"minimum value": count(that.Q1)
   



But you forgot to tell us which version of Limesurvey you are using.

 

File Attachment:

File Name: limesurvey...6499.lss
File Size:20.63 KB


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
More
3 years 9 months ago #221590 by DenisChenu
Remind the NAOK if you have some relevance or filter.

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 following user(s) said Thank You: tpartner, ElysiaChlorotica
The topic has been locked.
More
3 years 9 months ago - 3 years 9 months ago #221622 by ElysiaChlorotica
Thank you for your answers. I am using LimeSurvey Version 2.62.2+170203

This works:
Code:
count(that.MultipleChoiceQuestion.NAOK)

However, if the minimum value is 0, the shown tip is somewhat wrong.

It says
Your answer must be at least 0Your answer must be 0

When it should say
Your answer must be at least 0

like it does with the other numbers.

Is there some workaround for this issue that does not include setting a maximum value or needing administrative privileges?
 
Last edit: 3 years 9 months ago by ElysiaChlorotica.
The topic has been locked.
More
3 years 9 months ago #221623 by ElysiaChlorotica
Ok i solved it with the following question validation equation:
Code:
this ge count(that.F4.NAOK)
The above example works, but the following one does not:
Code:
this >= count(that.F4.NAOK)
I don't know why this is though.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
3 years 9 months ago #221698 by DenisChenu

However, if the minimum value is 0, the shown tip is somewhat wrong.

It says
Your answer must be at least 0Your answer must be 0

When it should say
Your answer must be at least 0

 
It's great if can try to fix it (unsure) : can you report the issue pleas e?

About ge VS >= : what is your LimeSurvey version and build number ?
 

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.
More
3 years 9 months ago #221709 by DenisChenu

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