Frustrating Array Values

4 years 11 months ago #87295 by helper
helper created the topic: Frustrating Array Values
I have a three question survey. The first two questions are in a separate group (G-0) from the third (G-1).

The first two questions have the same array answers, but what I would like to do is to add the value of each of the two questions to determine whether or not to display the next group. So... from my limited understanding of the conditionals, I want to ADD the values of question one and two - VALUES (not the textual aspect). If their totals are greater than or equal to a numeric value of 3 then display the next group - otherwise quit.

In most cases, for most of my surveys, I am not really interested in the textual aspect of any of the answers; rather I need to be able to work with their position in an array.

Example:

A[0]-1 A1 [VALUE: 0] Not at all
A[0]-2 A2 [VALUE: 1] Several days
A[0]-3 A3 [VALUE: 2] More than half the days
A[0]-4 A4 [VALUE: 3] Nearly every day

My questions:

1. Is there any method to dump out of a survey at the end of a group when a condition is met?

2. Can conditionals be set at the group level?

3. How do I set a conditional for a question for the sum of values of a previous group?

4 years 11 months ago #87301 by mdekker
mdekker replied the topic: Frustrating Array Values
Check out Expression Manager in the online docs. You can set group level relevance equations. There are some samples in the documentation. Not sure if you can work with assessment values in relevance so i would advice to set the answercode to the value you would like to use.

---
Menno Dekker

4 years 11 months ago - 4 years 11 months ago #87311 by helper
helper replied the topic: Frustrating Array Values
Thus the frustration... Here is what works (only at the question level at the second group):

sum(766173X18X201SQ001.valueNAOK,766173X18X202SQ001.valueNAOK) >= 3

This fails at the group level -- I will go ahead and put in a bug (06768 -- bugs.limesurvey.org/view.php?id=6768 ).

Thanks mdekker!
Last Edit: 4 years 11 months ago by helper.