Skip logic/Relevance statements in ODK Build

Hi,

I am trying to add skip patterns to a form that I have created in
Build. Most of my skip patterns are working just fine because they are
based on one statement (e.g. /data/Q1=1). However, I am having trouble
with the skip pattern when I need to use 2 statements (e.g. /data/
Q2>=11 or /data/Q2<=18) What is wrong with the second relevance
statement? I have tried /data/Q2>=11 or Q2<=18 and that didn't work. I
have also tried:

/data/Q2>=11 or <=18
/data/Q2>=11or/data/Q2<=18

Neither of these worked. Similarly, I am trying to build a skip into
my form that involves 2 different questions (e.g. /data/Q6!=''0' and /
data/Q18>0) This has not worked either. Please let me know how I can
fix them.

Thanks!

You need to specify the left and right sides for each comparison. e.g.,

/data/Q2 >= 11 or /data/Q1 <= 8

··· On Fri, Apr 27, 2012 at 11:07 AM, Meagan wrote:

Hi,

I am trying to add skip patterns to a form that I have created in
Build. Most of my skip patterns are working just fine because they are
based on one statement (e.g. /data/Q1=1). However, I am having trouble
with the skip pattern when I need to use 2 statements (e.g. /data/
Q2>=11 or /data/Q2<=18) What is wrong with the second relevance
statement? I have tried /data/Q2>=11 or Q2<=18 and that didn't work. I
have also tried:

/data/Q2>=11 or <=18
/data/Q2>=11or/data/Q2<=18

Neither of these worked. Similarly, I am trying to build a skip into
my form that involves 2 different questions (e.g. /data/Q6!=''0' and /
data/Q18>0) This has not worked either. Please let me know how I can
fix them.

Thanks!

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

please i used the odk build to develop a form now i have two different(Sector_Information1 and Sector_Information1 )groups. before these groups show with Sector_Information coming first n the next swipe Sector_Information1 comes.
i have a (choose one) check-box which i want to choose one sector(Agriculture, Education or Energy) so either Sector_Information or Sector_Information1 only shows.

I also generally find better luck if I use parentheses, ie, something like
(/data/Q2 >= 11) or (/data/Q1 <= 8)

or if using xlsform,
(${Q2} >= 11) or (${Q1} <=8)

··· On Fri, Apr 27, 2012 at 3:50 PM, Mitch S wrote:

You need to specify the left and right sides for each comparison. e.g.,

/data/Q2 >= 11 or /data/Q1 <= 8

On Fri, Apr 27, 2012 at 11:07 AM, Meagan kaymeagan@gmail.com wrote:

Hi,

I am trying to add skip patterns to a form that I have created in
Build. Most of my skip patterns are working just fine because they are
based on one statement (e.g. /data/Q1=1). However, I am having trouble
with the skip pattern when I need to use 2 statements (e.g. /data/
Q2>=11 or /data/Q2<=18) What is wrong with the second relevance
statement? I have tried /data/Q2>=11 or Q2<=18 and that didn't work. I
have also tried:

/data/Q2>=11 or <=18
/data/Q2>=11or/data/Q2<=18

Neither of these worked. Similarly, I am trying to build a skip into
my form that involves 2 different questions (e.g. /data/Q6!=''0' and /
data/Q18>0) This has not worked either. Please let me know how I can
fix them.

Thanks!

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

--
Prabhas Pokharel
http://twitter.com/prabhasp
Nepal mobile: +977 98137 91044
US mobile: +1 347 948 7654
skype/facebook/whatever: prabhasp

Hi there,

You will have to use relevance to do this branching. I'd recommend you
switch to XLSForm because it'll be easier to do the form building
there. See http://xlsform.org/#relevant for more.

Yaw

··· -- Need ODK consultants? Nafundi provides form design, server setup, in-field training, and software development for ODK. Go to https://nafundi.com to get started.

On Fri, Dec 11, 2015 at 8:03 PM, senyoab@gmail.com wrote:

please i used the odk build to develop a form now i have two different(Sector_Information1 and Sector_Information1 )groups. before these groups show with Sector_Information coming first n the next swipe Sector_Information1 comes.
i have a (choose one) check-box which i want to choose one sector(Agriculture, Education or Energy) so either Sector_Information or Sector_Information1 only shows.

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

It might also be the <> symbols causing the problem. You might need to
replace them with xml entities. By that I mean instead of writing < write
< and instead of > write >
Regards,
-Nathan

··· On Fri, Apr 27, 2012 at 12:53 PM, Prabhas Pokharel < prabhas.pokharel@gmail.com> wrote:

I also generally find better luck if I use parentheses, ie, something like
(/data/Q2 >= 11) or (/data/Q1 <= 8)

or if using xlsform,
(${Q2} >= 11) or (${Q1} <=8)

On Fri, Apr 27, 2012 at 3:50 PM, Mitch S mitchellsundt@gmail.com wrote:

You need to specify the left and right sides for each comparison. e.g.,

/data/Q2 >= 11 or /data/Q1 <= 8

On Fri, Apr 27, 2012 at 11:07 AM, Meagan kaymeagan@gmail.com wrote:

Hi,

I am trying to add skip patterns to a form that I have created in
Build. Most of my skip patterns are working just fine because they are
based on one statement (e.g. /data/Q1=1). However, I am having trouble
with the skip pattern when I need to use 2 statements (e.g. /data/
Q2>=11 or /data/Q2<=18) What is wrong with the second relevance
statement? I have tried /data/Q2>=11 or Q2<=18 and that didn't work. I
have also tried:

/data/Q2>=11 or <=18
/data/Q2>=11or/data/Q2<=18

Neither of these worked. Similarly, I am trying to build a skip into
my form that involves 2 different questions (e.g. /data/Q6!=''0' and /
data/Q18>0) This has not worked either. Please let me know how I can
fix them.

Thanks!

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

--
Prabhas Pokharel
http://twitter.com/prabhasp
Nepal mobile: +977 98137 91044
US mobile: +1 347 948 7654
skype/facebook/whatever: prabhasp

When within ODK Build you do not have to; it will do the replacement for you. Makes writing logic quite a bit less frustrating.

Best,
-Clint

··· On Friday, April 27, 2012 at 1:28 PM, Nathan Breit wrote:

It might also be the <> symbols causing the problem. You might need to replace them with xml entities. By that I mean instead of writing < write < and instead of > write >
Regards,
-Nathan

On Fri, Apr 27, 2012 at 12:53 PM, Prabhas Pokharel <prabhas.pokharel@gmail.com (mailto:prabhas.pokharel@gmail.com)> wrote:

I also generally find better luck if I use parentheses, ie, something like
(/data/Q2 >= 11) or (/data/Q1 <= 8)

or if using xlsform,
(${Q2} >= 11) or (${Q1} <=8)

On Fri, Apr 27, 2012 at 3:50 PM, Mitch S <mitchellsundt@gmail.com (mailto:mitchellsundt@gmail.com)> wrote:

You need to specify the left and right sides for each comparison. e.g.,

/data/Q2 >= 11 or /data/Q1 <= 8

On Fri, Apr 27, 2012 at 11:07 AM, Meagan <kaymeagan@gmail.com (mailto:kaymeagan@gmail.com)> wrote:

Hi,

I am trying to add skip patterns to a form that I have created in
Build. Most of my skip patterns are working just fine because they are
based on one statement (e.g. /data/Q1=1). However, I am having trouble
with the skip pattern when I need to use 2 statements (e.g. /data/
Q2>=11 or /data/Q2<=18) What is wrong with the second relevance
statement? I have tried /data/Q2>=11 or Q2<=18 and that didn't work. I
have also tried:

/data/Q2>=11 or <=18
/data/Q2>=11or/data/Q2<=18

Neither of these worked. Similarly, I am trying to build a skip into
my form that involves 2 different questions (e.g. /data/Q6!=''0' and /
data/Q18>0) This has not worked either. Please let me know how I can
fix them.

Thanks!

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com (mailto:mitchellsundt@gmail.com)

--
Prabhas Pokharel
http://twitter.com/prabhasp
Nepal mobile: +977 98137 91044 (tel:%2B977%2098137%2091044)
US mobile: +1 347 948 7654 (tel:%2B1%20347%20948%207654)
skype/facebook/whatever: prabhasp

Clint, in the final output, it does have to be > instead of > , right?
The Xform will choke in < or >, is that correct?

☞§※☼:airplane::open_umbrella::slight_smile:
~Neil

··· On Fri, Apr 27, 2012 at 4:29 PM, Clint Tseng wrote: > When within ODK Build you do not have to; it will do the replacement for > you. Makes writing logic quite a bit less frustrating. > >

I have achieved the relevant function but now i need the next question to load right after the select one (answer is choose)all on the same page. On mine current form i need to swipe to the next page n return back before it loads the next relevant questions for me.
Want i want is for the next question to load right after the fist question is chosen on the same page

That is definitely correct. ODK Build automatically encodes all input you give it as appropriate (and tries to avoid double-encoding, so if you do put > or & into it, it'll leave it alone), but otherwise the XML is considered malformed.

Best,
-Clint

··· On Friday, April 27, 2012 at 2:20 PM, Neil Hendrick wrote:

Clint, in the final output, it does have to be > instead of > , right?
The Xform will choke in < or >, is that correct?

☞§※☼:airplane::open_umbrella::slight_smile:
~Neil

On Fri, Apr 27, 2012 at 4:29 PM, Clint Tseng <cxlt@cs.washington.edu (mailto:cxlt@cs.washington.edu)> wrote:

When within ODK Build you do not have to; it will do the replacement for
you. Makes writing logic quite a bit less frustrating.

It can't be on the same page.

Long-standing limitation of ODK Collect.

··· On Fri, Jan 22, 2016 at 8:34 AM, wrote:

I have achieved the relevant function but now i need the next question to
load right after the select one (answer is choose)all on the same page. On
mine current form i need to swipe to the next page n return back before it
loads the next relevant questions for me.
Want i want is for the next question to load right after the fist question
is chosen on the same page

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

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