- Posts: 6
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Validation for Subquestions using 'self'
- BillLenoir
- Topic Author
- Offline
- New Member
Less
More
8 years 3 months ago #129793
by BillLenoir
Validation for Subquestions using 'self' was created by BillLenoir
I want to make sure that each subquestion in an Array(Numbers) is a whole number. I have entered the following for "Question Validation Equation":
(regexMatch('/^[0-9]*$/',UgEnrollmentCy_DegSeekingFirstYear_FtMale))
Perfect, works great. But I don't want to have to do this for each of the 25 subquestions. However, if I try this:
(regexMatch('/^[0-9]*$/',self))
The system replaces 'self' with pointers to all 25 subquestions, so the regexMatch fails for having too many attributes.
What can I do?
(regexMatch('/^[0-9]*$/',UgEnrollmentCy_DegSeekingFirstYear_FtMale))
Perfect, works great. But I don't want to have to do this for each of the 25 subquestions. However, if I try this:
(regexMatch('/^[0-9]*$/',self))
The system replaces 'self' with pointers to all 25 subquestions, so the regexMatch fails for having too many attributes.
What can I do?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13597
- Thank you received: 2487
8 years 3 months ago #129800
by DenisChenu
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.
Replied by DenisChenu on topic Validation for Subquestions using 'self'
Hi,
self give an array , regexMatch wait for styring : this broke.
Feauture request linked : bugs.limesurvey.org/view.php?id=8348
But here : different feature needed.
You have to do regexMatch and regexMatch and regexMatch .... manually
self give an array , regexMatch wait for styring : this broke.
Feauture request linked : bugs.limesurvey.org/view.php?id=8348
But here : different feature needed.
You have to do regexMatch and regexMatch and regexMatch .... manually
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.
- first
- Offline
- Elite Member
Less
More
- Posts: 227
- Thank you received: 36
8 years 3 weeks ago #133684
by first
Survey Designer and Programmer
Replied by first on topic Validation for Subquestions using 'self'
What about placing (regexMatch('/^[0-9]*$/',self)) in validation field that is just below relevance field. It worked for me.
Survey Designer and Programmer
The topic has been locked.