Relevence Not Working as expetected

Hi

I am struggling with what should be a very strait forward relevance setting
that does not seem to be working. The relevance is set to a condition on 2
prior questions.

The first question is a single select yes/no question followed by a single
select. I have set the relevance to the group as below:

selected(${u21},'yesno_1') and
not(selected(${given_alcohol_u21},'given_freq_u14'))

My selection options are below:

Question 1 name = u21

Choices are:

yesno

yesno_1

Yes

yesno

yesno_2

No

yesno

yesno_3

Don't Read - Refused

yesno

yesno_4

Don't Read - Don't Know

Question 2 name = given_alcohol_u21

given_freq

given_freq_1

2 or more times a day

given_freq

given_freq_2

Daily

given_freq

given_freq_3

5 to 6 times a week

given_freq

given_freq_4

3 to 4 times a week

given_freq

given_freq_5

Twice a week

given_freq

given_freq_6

Once a week

given_freq

given_freq_7

Once every 10 days

given_freq

given_freq_8

Once every 2 weeks

given_freq

given_freq_9

Once every 3 to 4 weeks/Once a month

given_freq

given_freq_10

Once every 6 weeks/4-5 times in the last 6 months

given_freq

given_freq_11

Once every 2 to 3 months/2-3 times in the last 6 months

given_freq

given_freq_12

Don't know, but at least once (in the last 6 months)

given_freq

given_freq_13

Less than once (in the last six months)

given_freq

given_freq_14

Never

given_freq

given_freq_15

DON'T READ - Refused

given_freq

given_freq_16

DON'T READ - Don't know

I am trying to get the form to skip the group which has the relevance set
if the respondent selects yesno_1 and selects given_freq_14 but it displays
even if given_freq_14 is selected.

Help please.

Bashir

Bashir,

Your relevance at the top of your email does not match the sentence at the
bottom.

Remove the not from your relevance statement.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Wed, Apr 23, 2014 at 3:53 AM, Bashir Jahed admin@osilab.net wrote:

Hi

I am struggling with what should be a very strait forward relevance
setting that does not seem to be working. The relevance is set to a
condition on 2 prior questions.

The first question is a single select yes/no question followed by a single
select. I have set the relevance to the group as below:

selected(${u21},'yesno_1') and
not(selected(${given_alcohol_u21},'given_freq_u14'))

My selection options are below:

Question 1 name = u21

Choices are:

yesno

yesno_1

Yes

yesno

yesno_2

No

yesno

yesno_3

Don't Read - Refused

yesno

yesno_4

Don't Read - Don't Know

Question 2 name = given_alcohol_u21

given_freq

given_freq_1

2 or more times a day

given_freq

given_freq_2

Daily

given_freq

given_freq_3

5 to 6 times a week

given_freq

given_freq_4

3 to 4 times a week

given_freq

given_freq_5

Twice a week

given_freq

given_freq_6

Once a week

given_freq

given_freq_7

Once every 10 days

given_freq

given_freq_8

Once every 2 weeks

given_freq

given_freq_9

Once every 3 to 4 weeks/Once a month

given_freq

given_freq_10

Once every 6 weeks/4-5 times in the last 6 months

given_freq

given_freq_11

Once every 2 to 3 months/2-3 times in the last 6 months

given_freq

given_freq_12

Don't know, but at least once (in the last 6 months)

given_freq

given_freq_13

Less than once (in the last six months)

given_freq

given_freq_14

Never

given_freq

given_freq_15

DON'T READ – Refused

given_freq

given_freq_16

DON'T READ – Don't know

I am trying to get the form to skip the group which has the relevance set
if the respondent selects yesno_1 and selects given_freq_14 but it
displays even if given_freq_14 is selected.

Help please.

Bashir

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Bashir
Could I also suggest that instead of naming given_freq_16 you simply name it '16' so that writing relevance would be much easier.
Example:

given_freq 1 Always
given_freq 2 Never

Then when writing select statements you could write:

${u21}=1 in the relevance column
Just makes the work simpler especially when you have like a thousand fields which need relevance

··· On Wednesday, April 23, 2014 1:53:21 PM UTC+3, Bashir Jahed wrote: > Hi > > I am struggling with what should be a very strait forward relevance setting that does not seem to be working. The relevance is set to a condition on 2 prior questions. > > The first question is a single select yes/no question followed by a single select. I have set the relevance to the group as below: > selected(${u21},'yesno_1') and not(selected(${given_alcohol_u21},'given_freq_u14')) > > My selection options are below: > Question 1 name = u21 > Choices are: > yesno > yesno_1 > Yes > yesno > yesno_2 > No > yesno > yesno_3 > Don't Read - Refused > yesno > yesno_4 > Don't Read - Don't Know > > Question 2 name = given_alcohol_u21 > given_freq > given_freq_1 > 2 or more times a day > given_freq > given_freq_2 > Daily > given_freq > given_freq_3 > 5 to 6 times a week > given_freq > given_freq_4 > 3 to 4 times a week > given_freq > given_freq_5 > Twice a week > given_freq > given_freq_6 > Once a week > given_freq > given_freq_7 > Once every 10 days > given_freq > given_freq_8 > Once every 2 weeks > given_freq > given_freq_9 > Once every 3 to 4 weeks/Once a month > given_freq > given_freq_10 > Once every 6 weeks/4-5 times in the last 6 months > given_freq > given_freq_11 > Once every 2 to 3 months/2-3 times in the last 6 months > given_freq > given_freq_12 > Don't know, but at least once (in the last 6 months) > given_freq > given_freq_13 > Less than once (in the last six months) > given_freq > given_freq_14 > Never > given_freq > given_freq_15 > DON'T READ – Refused > given_freq > given_freq_16 > DON'T READ – Don't know > > I am trying to get the form to skip the group which has the relevance set if the respondent selects yesno_1 and selects given_freq_14 but it displays even if given_freq_14 is selected. > > Help please. > > Bashir

Please keep in mind that the values of select-one and select-many questions
are strings, not integers. This means you should compare them via
${u21}='1', etc.

··· On Sat, Apr 26, 2014 at 8:14 AM, wrote:

On Wednesday, April 23, 2014 1:53:21 PM UTC+3, Bashir Jahed wrote:

Hi

I am struggling with what should be a very strait forward relevance
setting that does not seem to be working. The relevance is set to a
condition on 2 prior questions.

The first question is a single select yes/no question followed by a
single select. I have set the relevance to the group as below:
selected(${u21},'yesno_1') and
not(selected(${given_alcohol_u21},'given_freq_u14'))

My selection options are below:
Question 1 name = u21
Choices are:
yesno
yesno_1
Yes
yesno
yesno_2
No
yesno
yesno_3
Don't Read - Refused
yesno
yesno_4
Don't Read - Don't Know

Question 2 name = given_alcohol_u21
given_freq
given_freq_1
2 or more times a day
given_freq
given_freq_2
Daily
given_freq
given_freq_3
5 to 6 times a week
given_freq
given_freq_4
3 to 4 times a week
given_freq
given_freq_5
Twice a week
given_freq
given_freq_6
Once a week
given_freq
given_freq_7
Once every 10 days
given_freq
given_freq_8
Once every 2 weeks
given_freq
given_freq_9
Once every 3 to 4 weeks/Once a month
given_freq
given_freq_10
Once every 6 weeks/4-5 times in the last 6 months
given_freq
given_freq_11
Once every 2 to 3 months/2-3 times in the last 6 months
given_freq
given_freq_12
Don't know, but at least once (in the last 6 months)
given_freq
given_freq_13
Less than once (in the last six months)
given_freq
given_freq_14
Never
given_freq
given_freq_15
DON'T READ – Refused
given_freq
given_freq_16
DON'T READ – Don't know

I am trying to get the form to skip the group which has the relevance
set if the respondent selects yesno_1 and selects given_freq_14 but it
displays even if given_freq_14 is selected.

Help please.

Bashir

Hi Bashir
Could I also suggest that instead of naming given_freq_16 you simply name
it '16' so that writing relevance would be much easier.
Example:

given_freq 1 Always
given_freq 2 Never

Then when writing select statements you could write:

${u21}=1 in the relevance column
Just makes the work simpler especially when you have like a thousand
fields which need relevance

--

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en


You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com