Welcome to the LimeSurvey Community Forum

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

How to refer to the subquestion variable in subquery validation

  • azochowski
  • azochowski's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago - 4 years 1 month ago #195245 by azochowski
Hello,

In subquery I have subquestion:

# Nazwa [ID] Relewancja [Walidacja] (Wartość domyślna) Tekst [Pomoc] (Podpowiedź)

A[1]-1 SQ1 [VALUE: SQ1] Możliwość zadawania pytań (1 - TAK, 2 - NIE)

Better view in attachment.

I want to limit value in this field to null, 1 or 2. How can I do it? How I should refer to this subquestion in subquery validation.

Thanks in advance for answer.
Attachments:
Last edit: 4 years 1 month ago by azochowski.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #195251 by tpartner
Try this (line breaks inserted for clarity):

Code:
(
  self.sq_SQ001_SQ1 == '' 
  OR 
  self.sq_SQ001_SQ1 == 1 
  OR 
  self.sq_SQ001_SQ1 == 2
)
AND
(
  self.sq_SQ002_SQ1 == '' 
  OR 
  self.sq_SQ002_SQ1 == 1 
  OR 
  self.sq_SQ002_SQ1 == 2
)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • azochowski
  • azochowski's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 1 month ago - 4 years 1 month ago #195252 by azochowski
Thanks. That's work great.
I have second question.
Could I make on the first column scale 1 - 2 and on the columns 2 - 4 scale 1 - 5?
Could I refer to whole column?
Last edit: 4 years 1 month ago by azochowski.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 1 month ago #195254 by tpartner
Here is a thread that describes how to insert drop-downs into an array-texts type question (you may have to adapt slightly for your reqirements) - www.limesurvey.org/forum/can-i-do-this-w...question-type#174586

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose