Welcome to the LimeSurvey Community Forum

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

Question validation equation

More
11 years 5 months ago #106531 by MikeConom
is it possible to check the year in the Question validation equation ?

i am trying with this but return error
Code:
(if(! is_empty(xrn1_2_1_3.NAOK), 
xrn1_2_1_3.NAOK >= "1970" &amp;&amp; xrn1_2_1_3.NAOK <= {(new Date).getFullYear()}, xrn1_2_1_3.NAOK == ""))
The topic has been locked.
More
11 years 5 months ago - 11 years 5 months ago #106550 by tpartner
Mike, could you please elaborate? What question type(s), etc? What exactly are you trying to do?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 11 years 5 months ago by tpartner.
The topic has been locked.
More
11 years 5 months ago #106552 by MikeConom
Tony
The question type is array numbers and i am trying to check the current year in one field.
i have found a solution, i made a hidden question and i have apply the year in the field, so
i use the senario
Code:
(if(! is_empty(xrn1_2_1_3.NAOK), 
xrn1_2_1_3.NAOK >= "1970" &amp;&amp; xrn1_2_1_3.NAOK <= CurrentYear.NAOK, xrn1_2_1_3.NAOK == ""))

i dont know if there is a better senario to check the year inside the validation
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose