expression for comparing lists - InfoPath Dev
in

InfoPath Dev

expression for comparing lists

Last post 12-08-2005 02:08 PM by Ben. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-08-2005 01:17 PM

    • Ben
    • Top 500 Contributor
    • Joined on 11-17-2005
    • Germany
    • Posts 33

    expression for comparing lists

    I have urgend problem. I have a dropdown listbox and I want to hide it if the user selects the expression "Other". So I created a xml file like this:
    <AREACLASS>
    <Class class="Non Hazardous" />
    <Class class="General Purpose" />
    <Class class="Cl1, Div1 B,C,D" />
    <Class class="Cl1, Div1 C,D" />
    <Class class="Cl1, Div1 D" />
    <Class class="Cl1, Div2 B,C,D" />
    <Class class="Cl1, Div2 C,D" />
    <Class class="Cl1, Div2 D" />
    <Class class="Cl1, Div2 C" />
    <Class class="Cl1, Div2 B" />
    <Class class="Cl1, Div2 G" />
    </AREACLASS>
    and used it as a secondary data source. It has the same entries as my ddl exept of the expression "Other". I created the rule: if [class] does not contain [selected ddl element] or [selected ddl element] contains "Other" hide this control. That works only for the first element in my xml file. Which expresion do I have to use to make InfoPath comparing the selected item with all the entries in the xml file?

    Thanks Ben
  • 12-08-2005 02:00 PM In reply to

    Re: expression for comparing lists

    I'm not sure I understand your question. If you have a ddl that you want to hide when the user selects other, just use conditional formatting to hide it when it equals "other"...

    Are you wanting to elimate Other from the drop down list when someone chooses it or something? If you're doing that then, why is it in the list at all? If you're trying to pop up a new DDL when the user selects Other, why don't you just put the DDL inside of a repeating section and have them click "Add item"?

    Please clarify, hope this helps :)

    ---------------
    Matt Faus
    Matt Faus / Microsoft InfoPath MVP
    Qdabra® Software / Streamline data gathering to turn process into knowledge
  • 12-08-2005 02:08 PM In reply to

    • Ben
    • Top 500 Contributor
    • Joined on 11-17-2005
    • Germany
    • Posts 33

    Re: expression for comparing lists

    Hi Matt,
    if the user selects the ddl entry "Other" the ddl should be hidden and a text box should apear to enter the new type. I know this case was discussed in an earlier post and my conclusion works for ddl up to three entrys because I can aply the rules for every single element. But there must be an expression to make InfoPath compare the ddl entry with the whole xml file entrys.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.