Claudio-
claudio123 wrote:
1) I'd REALLY like to be able to define forward jumps, but this might ask for a completely different concept.
What kind of forward jumps do you want?
What I call relevance, below, is effectively the same as what LimeSurvey does - in my case, I'd write Not Applicable to the database in addition to making the question invisible (although I didn't do it as gracefully as LimeSurvey does).
I've found is that "relevance" can replace any forward-jumping "goto" statement using the following equation.
If you are converting a survey that heavily uses such Gotos, it is preferable to automate that conversion function, otherwise it can get a little mind-numbing, but it definitely works and can support cascading.
More often, I find a need to jump over sections - say if Q1=Y I want to skip to Q5, I'd have a relevance of Q1!=Y for questions 2-4. You don't have to put complete relevance equations for every question. For example, say you have 10 questions, and you only want to show Q2 if Q1 is Y, and only show Q3 if Q2 is Y, etc. you'd have relevance of Q1==Y for Q2, and Q2==Y for Q3, ... and Q9==Y for Q10.
claudio123 wrote:
2) I'd also like to be able to make conditions like this:
qu1, qu2, qu3, qu4 and qu5 are arrays, where qu1 has only one, qu2 and qu3 have 4 and qu4 and qu5 have 7 subquestions with 4 different answers (1,2,3,4) each.
I'd like to be able to define a condition that is something like:
Display qu6
- if at least 5 subquestions are answered 3, where two have to be answers to subquestions of qu5
and if at least 3 subquestions are answered "4", where one of them is an answer to qu1.
Since there are database fields for each of those subquestions, that should also be do-able. Say your subquestions are names sq1-sq7 (depending upon the number of subquestions for each question), you could make one long relevance equation, but I'd create a couple of hidden Equations to make it easier to debug and validate.
numQeq3 = count(qu1.sq1==3, qu2.sq1==3, qu2.sq2==3, qu2.sq3==3, qu2.sq4==3, qu3.sq1==3, qu3.sq2==3, qu3.sq3==3, qu3.sq4==3, qu4.sq1==3, qu4.sq2==3, qu4.sq3==3, qu4.sq4==3, qu4.sq5==3, qu4.sq6==3, qu4.sq7==3, qu5.sq1==3, qu5.sq2==3, qu5.sq3==3, qu5.sq4==3, qu5.sq5==3, qu5.sq6==3, qu5.sq7==3)
numQeq3inQ5 = count(qu5.sq1==3, qu5.sq2==3, qu5.sq3==3, qu5.sq4==3, qu5.sq5==3, qu5.sq6==3, qu5.sq7==3)
numQeq4 = count(qu1.sq1==4, qu2.sq1==4, qu2.sq2==4, qu2.sq3==4, qu2.sq4==4, qu3.sq1==4, qu3.sq2==4, qu3.sq3==4, qu3.sq4==4, qu4.sq1==4, qu4.sq2==4, qu4.sq3==4, qu4.sq4==4, qu4.sq5==4, qu4.sq6==4, qu4.sq7==4, qu5.sq1==4, qu5.sq2==4, qu5.sq3==4, qu5.sq4==4, qu5.sq5==4, qu5.sq6==4, qu5.sq7==4)
I didn't understand the last condition. Do you mean that if qu1 was answered 1, that at least one of the remaining sub-questions was also answered 1? If so,
lastCondition = count(qu2.sq1==qu1.sq1, qu2.sq2==qu1.sq1, qu2.sq3==qu1.sq1, qu2.sq4==qu1.sq1, qu3.sq1==qu1.sq1, qu3.sq2==qu1.sq1, qu3.sq3==qu1.sq1, qu3.sq4==qu1.sq1, qu4.sq1==qu1.sq1, qu4.sq2==qu1.sq1, qu4.sq3==qu1.sq1, qu4.sq4==qu1.sq1, qu4.sq5==qu1.sq1, qu4.sq6==qu1.sq1, qu4.sq7==qu1.sq1, qu5.sq1==qu1.sq1, qu5.sq2==qu1.sq1, qu5.sq3==qu1.sq1, qu5.sq4==qu1.sq1, qu5.sq5==qu1.sq1, qu5.sq6==qu1.sq1, qu5.sq7)
Then, the relevance equation for qu6 would be:
(numQeq3 >= 5) and (numQeq3inQ5 >= 2) and (numQeq4 >= 3) and (lastCondition >= 1)
claudio123 wrote:
3) It would be great if this worked no matter if qu6 is on the same or on the next page (=in the same group).
Yes, this approach would work even if qu6 was on the same page.