Hi ODK pros,

I have been learning XLSform. It's great but I've yet to grasp the xpath

language. May I ask for a push-start on building an expressions?

Basically, I am using two variables, a & b, to calculate a third one, c.

The choices for variables a and b are 0,1 and 99.

If (a=1 and b=1) or (a=0 and b =0) I would like c to spit out 1. For all

else, I would like c to be 0.

If anyone could let me know how they would go about this in xlsform, I

would be most grateful.

Respect,

Bill

Have you seen this: http://opendatakit.org/help/form-design/binding/

## ···

On Mon, May 13, 2013 at 7:13 AM, Bill Olander wrote:Hi ODK pros,

I have been learning XLSform. It's great but I've yet to grasp the

xpath language. May I ask for a push-start on building an expressions?

Basically, I am using two variables, a & b, to calculate a third one, c.

The choices for variables a and b are 0,1 and 99.

If (a=1 and b=1) or (a=0 and b =0) I would like c to spit out 1. For

all else, I would like c to be 0.

If anyone could let me know how they would go about this in xlsform, I

would be most grateful.

Respect,

Bill## --

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/groups/opt_out.

--

Mitch Sundt

Software Engineer

University of Washington

mitchellsundt@gmail.com

Bill, you need something like this:

*type* *name* *calculate* calculate c if ((${a} = 0 and ${b} = 0)

or (${a} = 1 and ${b} = 1), 1, 0)

I suggest you check out the link that Mitch posted. Lots of information you

could pick up from there.

Nik

## ···

On Monday, May 13, 2013, Mitch Sundt wrote:Have you seen this: http://opendatakit.org/help/form-design/binding/

On Mon, May 13, 2013 at 7:13 AM, Bill Olander <billyolander@gmail.com<javascript:_e({}, 'cvml', 'billyolander@gmail.com');> wrote:

Hi ODK pros,

I have been learning XLSform. It's great but I've yet to grasp the

xpath language. May I ask for a push-start on building an expressions?

Basically, I am using two variables, a & b, to calculate a third one,

c. The choices for variables a and b are 0,1 and 99.

If (a=1 and b=1) or (a=0 and b =0) I would like c to spit out 1. For

all else, I would like c to be 0.

If anyone could let me know how they would go about this in xlsform, I

would be most grateful.

Respect,

Bill## --

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

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 <javascript:_e({},

'cvml', 'opendatakit%2Bunsubscribe@googlegroups.com');>.

For more options, visit https://groups.google.com/groups/opt_out.--

Mitch Sundt

Software Engineer

University of Washington

mitchellsundt@gmail.com <javascript:_e({}, 'cvml',

'mitchellsundt@gmail.com');>## --

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

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 <javascript:_e({},

'cvml', 'opendatakit%2Bunsubscribe@googlegroups.com');>.

For more options, visit https://groups.google.com/groups/opt_out.

Mitch and Nik-san,

thanks for this. I needed the start, but I'll study up and figure out

the next one myself!

Bill