Cascading Selects not working with XLSForm

I just can't work this one out. When I use the template from herehttp://opendatakit.org/wp-content/uploads/2012/07/new_cascading_select.xls,
everything is fine, however when I try with my own itemsets nothing shows
up in the second question. I assumed I had made a mistake (which I am sure
I mst have), but it is very subtle as the same .xml file works perfectly in
enketo.

Attached is the Excel spreadsheet which I can't get to work on my phone....
Any ideas gratefully received!

Test.xlsx (8.31 KB)

Looks like there is a bug in XLSForm...

Nathan: XLSForm should be fixed to leave the capitalizations of column
headings as-is, at least on the choices tab; or it should fail to produce
an xml file if there are capitalized column headings.

For some reason, the column headings in the choices tab are getting
lower-cased (or, at least, their first character is lowercased) (I'm not
sure if this is a general thing that XLSForm does).

So that in the XML file that is emitted, we have:

  <instance id="HealthFacs">
    <root>
      <item>
        <itextId>static_instance-HealthFacs-0</itextId>
        <province>1</province>
        <name>1</name>
        <district>2</district>
      </item>
     ...

Note that Province and District have been re-written as province and
district.

So then, when you have your filter condition:

<select1 ref="/Test/Dist">
  <label>Select your district</label>
  <itemset nodeset="instance('Districts')/root/item[Province=

/Test/Prov ]">



This fails. If you change Province above to province, then all is well.

But, XLSForm should be fixed to either fail to emit the XML if there are
capitalized column headings or leave the column headings as-is.

For now, I recommend making all the column headings on the choices sheet
only lower-case (and changing the filter conditions accordingly). That
will be robust to whatever changes we make to XLSForm.

Mitch

··· On Tue, Feb 26, 2013 at 4:09 AM, dj_bridges wrote:

I just can't work this one out. When I use the template from herehttp://opendatakit.org/wp-content/uploads/2012/07/new_cascading_select.xls,
everything is fine, however when I try with my own itemsets nothing shows
up in the second question. I assumed I had made a mistake (which I am sure
I mst have), but it is very subtle as the same .xml file works perfectly in
enketo.

Attached is the Excel spreadsheet which I can't get to work on my
phone.... Any ideas gratefully received!

--

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

I've removed column header lower casing from the XLSForm converter so this
should no longer be an issue. Sorry, for the trouble.
Regards,
-Nathan

··· On Tuesday, February 26, 2013 11:14:45 AM UTC-8, Mitch wrote: > > Looks like there is a bug in XLSForm... > > Nathan: XLSForm should be fixed to leave the capitalizations of column > headings as-is, at least on the choices tab; or it should fail to produce > an xml file if there are capitalized column headings. > > For some reason, the column headings in the choices tab are getting > lower-cased (or, at least, their first character is lowercased) (I'm not > sure if this is a general thing that XLSForm does). > > So that in the XML file that is emitted, we have: > > > > > static_instance-HealthFacs-0 > 1 > 1 > 2 > > ... > > Note that Province and District have been re-written as province and > district. > > So then, when you have your filter condition: > > > Select your district > > > > > > > This fails. If you change Province above to province, then all is well. > > But, XLSForm should be fixed to either fail to emit the XML if there are > capitalized column headings or leave the column headings as-is. > > For now, I recommend making all the column headings on the choices sheet > only lower-case (and changing the filter conditions accordingly). That > will be robust to whatever changes we make to XLSForm. > > Mitch > > On Tue, Feb 26, 2013 at 4:09 AM, dj_bridges <danielj...@gmail.com wrote: > >> I just can't work this one out. When I use the template from here, >> everything is fine, however when I try with my own itemsets nothing shows >> up in the second question. I assumed I had made a mistake (which I am sure >> I mst have), but it is very subtle as the same .xml file works perfectly in >> enketo. >> >> Attached is the Excel spreadsheet which I can't get to work on my >> phone.... Any ideas gratefully received! >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@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...@googlegroups.com . >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Mitch Sundt > Software Engineer > University of Washington > mitche...@gmail.com

Thanks Nathan and Mitch - can confirm that everything is now working as
expected....