Problem with xml based cascading list - InfoPath Dev
in

InfoPath Dev

Problem with xml based cascading list

Last post 08-02-2011 05:57 AM by mellimik. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-01-2011 12:35 PM

    Problem with xml based cascading list

    Hi there. For several hours now I've been stuck with this odd behavior of my form. I have an XML file within the template that has a list of mobile devices that should be displayed to the person filling the form based on the role level. With role level I mean that I have categorized different groups of people with a name and a numerical value. The numerical value is used in the form to display set of mobile devices that are allowed for that specific person. Basically it is just a drop down list box and a list box operating with a filter.

     For some reason the filter in the list box does not act as I expect. It should show only those mobile devices that have less than or equal value than the selected role level (10, 50 or 100), but it doesn't do so. I'm kind of stuck here, so I need a new pair of eyes, if you will.

     The XML file that is within the XSN follows below and the whole XSN is included as an attachment.

     --XML FOLLOWS--

    <?xml version="1.0" encoding="UTF-8" ?>
    <mobiledevice>
    <device display="Apple iPhone 4" name="iPhone" clearance="100" />
    <device display="Nokia E7" name="E7" clearance="100" />
    <device display="Nokia E5" name="E5" clearance="50" />
    <device display="Nokia 2730" name="2730" clearance="10" />
    </mobiledevice>

  • 08-01-2011 04:46 PM In reply to

    Re: Problem with xml based cascading list

    Not sure if this will solve your problem, but try changing to use fields instead of attributes.

    <?xml version="1.0" encoding="UTF-8" ?>
    <mobiledevice>
    <device>
    <display>Apple iPhone 4</display>
    <name>iPhone</name>
    <clearance>100</clearance>
    </device>

    ...

    </mobiledevice>

    Patrick Halstead
    Project Manager at Qdabra
  • 08-01-2011 10:31 PM In reply to

    Re: Problem with xml based cascading list

    Thanks for the reply. I tried to modify the XML so that the numerical value would be an element instead of attribute of an element, but it still does not work as I expect. It's like the underlying engine would not treat the values as numbers but something else. Huh, I had no idea task this trivial would prove itself this difficult..
  • 08-02-2011 05:57 AM In reply to

    Re: Problem with xml based cascading list

    I got it sorted out now. I had Text (String) selected as the Data Type in the drop down list where the filter was. Changing that to Whole Number (Integer) and re-creating the filter fixed my problem! As I suspected, InfoPath was not handling my values as numbers but instead comparing them as text strings, which was the simple but hard to find problem.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.