Token attribute as a validation source

Mehr
3 Jahre 6 Monate her #110237 von JayCharles
JayCharles erstellte das Thema Token attribute as a validation source
Hi All,

I am having trouble using a custom token attribute to validate the answer to a question.

token attribute_3 is the age of the participant at the time on interview. (eg. 55) When we ask a participant how old they were when they last had an operation, I want to use this age(attribute_3) to validate their answer.

eg. If the age of their last operation is greater than token attribute_3, throw up an error.

This is what I have tried up to date, without any luck.

Validation Equation:
((782874X662X3938SQ001 >= 0) and
(782874X662X3938SQ001 <= [attribute_3]) or
is_empty(782874X662X3938SQ001)) and

Validation Tip:
{if(((782874X662X3938SQ001 >= 0) and (782874X662X3938SQ001 <= [attribute_3])), '','Please enter an age that is less than you current age.’)}

I thought maybe the token attribute is a text field and needed to be converted. If so how do i do this?

Can anyone help?

Bitte Anmelden um an der Konversation teilzunehmen.

Mehr
3 Jahre 6 Monate her - 3 Jahre 6 Monate her #110239 von DenisChenu
DenisChenu antwortete auf das Thema: Token attribute as a validation source
Did you try with
((782874X662X3938SQ001 >= 0) and
(782874X662X3938SQ001 <= TOKEN:ATTRIBUTE_3) or
is_empty(782874X662X3938SQ001))

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Letzte Änderung: 3 Jahre 6 Monate her von DenisChenu.

Bitte Anmelden um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha