Complicated skip sequences

Hi Everyone,

I'm looking for a way to do a complicated skip sequence in XLSForm.

The skip sequence (in boolean form) would be something like this:
(${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female})

Any thoughts on how I could do this?

Thank you.
Nicholai

That should work, just add the missing quotation mark, and take out the
extra curly bracket near the end of the statement:

(${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female"})

/r
Nik

··· On Friday, September 28, 2012, nlidow wrote:

Hi Everyone,

I'm looking for a way to do a complicated skip sequence in XLSForm.

The skip sequence (in boolean form) would be something like this:
(${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female})

Any thoughts on how I could do this?

Thank you.
Nicholai

--
Post: opendatakit@googlegroups.com <javascript:_e({}, 'cvml',
'opendatakit@googlegroups.com');>
Unsubscribe: opendatakit+unsubscribe@googlegroups.com <javascript:_e({},
'cvml', 'opendatakit%2Bunsubscribe@googlegroups.com');>
Options: http://groups.google.com/group/opendatakit?hl=en

Thank you!

Nicholai

··· On Thursday, September 27, 2012 5:45:52 PM UTC-7, ニコノコ wrote: > > That should work, just add the missing quotation mark, and take out the > extra curly bracket near the end of the statement: > > (${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female"}) > > > /r > Nik > > On Friday, September 28, 2012, nlidow wrote: > >> Hi Everyone, >> >> I'm looking for a way to do a complicated skip sequence in XLSForm. >> >> The skip sequence (in boolean form) would be something like this: >> (${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female}) >> >> Any thoughts on how I could do this? >> >> Thank you. >> Nicholai >> >> >> >> >> -- >> Post: opendatakit@googlegroups.com >> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >> Options: http://groups.google.com/group/opendatakit?hl=en >> >

Sorry to bother again, but I keep getting an "Invalid XPath Expression" error for my skip sequence.

I tried typing this boolean expression into the relevant column:

(${h5a}="mainmale" AND ${sgender}="female") OR (${h5a}="mainfem" AND ${sgender}="male") OR ${h5a}="joint" OR ${h5a}="else" OR ${h5a}="jointelse" OR ${h5a}="jointother" OR ${h5a}="other"

I know it's a bit complicated...
Do I need to use different syntax? Or edit the xml file directly?

Thank you for the help.

Nicholai

··· On Sep 27, 2012, at 10:11 PM, nlidow wrote:

Thank you!

Nicholai

On Thursday, September 27, 2012 5:45:52 PM UTC-7, ニコノコ wrote:
That should work, just add the missing quotation mark, and take out the extra curly bracket near the end of the statement:
(${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female"})

/r
Nik

On Friday, September 28, 2012, nlidow wrote:
Hi Everyone,

I'm looking for a way to do a complicated skip sequence in XLSForm.

The skip sequence (in boolean form) would be something like this:
(${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female})

Any thoughts on how I could do this?

Thank you.
Nicholai

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

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

Use the following syntax:

selected(${h5a}, "mainmale") AND selected(${sgender}, "female") ....

Add parentheses to ensure proper operator precedence and readability.

Gaetano

··· On Thu, Sep 27, 2012 at 10:27 PM, Nicholai Lidow wrote: > Sorry to bother again, but I keep getting an "Invalid XPath Expression" > error for my skip sequence. > > I tried typing this boolean expression into the relevant column: > > (${h5a}="mainmale" AND ${sgender}="female") OR (${h5a}="mainfem" AND > ${sgender}="male") OR ${h5a}="joint" OR ${h5a}="else" OR ${h5a}="jointelse" > OR ${h5a}="jointother" OR ${h5a}="other" > > > I know it's a bit complicated... > Do I need to use different syntax? Or edit the xml file directly? > > Thank you for the help. > > Nicholai > > > > On Sep 27, 2012, at 10:11 PM, nlidow wrote: > > Thank you! > > Nicholai > > > On Thursday, September 27, 2012 5:45:52 PM UTC-7, ニコノコ wrote: >> >> That should work, just add the missing quotation mark, and take out the >> extra curly bracket near the end of the statement: >> >> (${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female"}) >> >> >> /r >> Nik >> >> On Friday, September 28, 2012, nlidow wrote: >>> >>> Hi Everyone, >>> >>> I'm looking for a way to do a complicated skip sequence in XLSForm. >>> >>> The skip sequence (in boolean form) would be something like this: >>> (${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female}) >>> >>> Any thoughts on how I could do this? >>> >>> Thank you. >>> Nicholai >>> >>> >>> >>> >>> >>> -- >>> Post: opendatakit@googlegroups.com >>> Unsubscribe: opendatakit+unsubscribe@googlegroups.com >>> Options: http://groups.google.com/group/opendatakit?hl=en > > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en

Thank you--- your suggestion worked.... but it also required using lower-case "and" and "or" expressions.

Best,
Nicholai

··· On Sep 28, 2012, at 10:50 AM, Gaetano Borriello wrote:

Use the following syntax:

selected(${h5a}, "mainmale") AND selected(${sgender}, "female") ....

Add parentheses to ensure proper operator precedence and readability.

Gaetano

On Thu, Sep 27, 2012 at 10:27 PM, Nicholai Lidow nlidow@gmail.com wrote:

Sorry to bother again, but I keep getting an "Invalid XPath Expression"
error for my skip sequence.

I tried typing this boolean expression into the relevant column:

(${h5a}="mainmale" AND ${sgender}="female") OR (${h5a}="mainfem" AND
${sgender}="male") OR ${h5a}="joint" OR ${h5a}="else" OR ${h5a}="jointelse"
OR ${h5a}="jointother" OR ${h5a}="other"

I know it's a bit complicated...
Do I need to use different syntax? Or edit the xml file directly?

Thank you for the help.

Nicholai

On Sep 27, 2012, at 10:11 PM, nlidow nlidow@gmail.com wrote:

Thank you!

Nicholai

On Thursday, September 27, 2012 5:45:52 PM UTC-7, ニコノコ wrote:

That should work, just add the missing quotation mark, and take out the
extra curly bracket near the end of the statement:

(${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female"})

/r
Nik

On Friday, September 28, 2012, nlidow wrote:

Hi Everyone,

I'm looking for a way to do a complicated skip sequence in XLSForm.

The skip sequence (in boolean form) would be something like this:
(${q1}="yes" AND ${sex}="male") OR (${q1}="no" AND ${sex}="female})

Any thoughts on how I could do this?

Thank you.
Nicholai

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

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

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

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