Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Question validation equation

Question validation equation 5 Monate 6 Tage her #106531

  • MikeConom
  • MikeConoms Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 39
  • Dank erhalten: 1
  • Karma: 0
is it possible to check the year in the Question validation equation ?

i am trying with this but return error
(if(! is_empty(xrn1_2_1_3.NAOK), 
xrn1_2_1_3.NAOK >= "1970" && xrn1_2_1_3.NAOK <= {(new Date).getFullYear()}, xrn1_2_1_3.NAOK == ""))
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Question validation equation 5 Monate 6 Tage her #106550

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4125
  • Dank erhalten: 761
  • Karma: 347
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Letzte Änderung: 5 Monate 6 Tage her von tpartner.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Question validation equation 5 Monate 6 Tage her #106552

  • MikeConom
  • MikeConoms Avatar
  • OFFLINE
  • Junior Lime
  • Beiträge: 39
  • Dank erhalten: 1
  • Karma: 0
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
(if(! is_empty(xrn1_2_1_3.NAOK), 
xrn1_2_1_3.NAOK >= "1970" && 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
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.257 Sekunden
Donation Image