complex conditionals

13 views
Skip to first unread message

eric couper

unread,
Aug 15, 2011, 8:53:03 AM8/15/11
to xls2xform
Hi all,

We wrote a beautiful survey section about the crops from the previous season.  Because of the severe drought here, most of the farmers didn't harvest this past season.  Instead of just throwing the questions out, we want to give the farmers the option of answering them about the previous season.  If there was no harvest in either of the past two seasons, we are just going to skip the section. 

This, however, is giving me a little trouble.  I'm not sure of xls2xml's ability to handle/prioritize and/or statements.  It's fine if I just have most recent season=yes or previous season=yes.  My trouble is when I want to add additional limitations on top of that. Right now my ambiguous condition is:

${land_use_ag}='yes' or ${land_use_ag_prev}='yes' and selected (${parcel_soil_fertility}, 'chemical_fertilizer') 

Of course, I need an order of operations of sorts.

Any advice?

Also, we have updated a summary of our project here.  We'll be posting more on our progress at the same site.

--
*Eric A. Couper, MPA DP <http://mdp.ei.columbia.edu/>*
ICT & Agriculture Coordinator
African Soil Information Service
s. eric.couper

Andrew Marder

unread,
Aug 15, 2011, 9:17:49 AM8/15/11
to xls2...@googlegroups.com
Hi Eric,

I think you need to add some parentheses around the or:

(${land_use_ag}='yes' or ${land_use_ag_prev}='yes') and selected (${parcel_soil_fertility}, 'chemical_fertilizer')

Andrew
Reply all
Reply to author
Forward
0 new messages