Using XPath to populate a list box based on check box selections - InfoPath Dev
in

InfoPath Dev

Using XPath to populate a list box based on check box selections

Last post 10-14-2010 11:22 PM by Patrick Halstead. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-18-2008 01:07 PM

    • mjaneczk
    • Top 500 Contributor
      Male
    • Joined on 02-18-2008
    • Dearborn, MI
    • Posts 35

    Using XPath to populate a list box based on check box selections

    I know that is amouthful, so let me explain.  I am trying ot design a decision tree for mapping features into a product.  So for instance, if someone says they want a V6 engine, MP3 jack, 20" rims - the list of cars having those features would be displayed.  The features would be represented as checkboxes and the resulting list of cars with those checkboxes would be a list box. 

    I have an XML file representing the input to this decision tree, and it is like the example for cascading drop downs - where features are attributes of vehicle nodes. 

    <vehicles>

    <vehicle name="F150" rims="17in" mp3="no"/>

    <vehicle name="Taurus" rims="20in" mp3="yes"/>

    </vehicles>

    What I am struggling with is how to map the checkbox selections into the XPath I need to select the the vehicle name. 

    Thanks

    Mike

    Mike Janeczko
    Ford Motor Company
  • 02-18-2008 03:22 PM In reply to

    Re: Using XPath to populate a list box based on check box selections

    Hi Mike and welcome to the forum.

    Once you have your data source with all of the particular attributes setup, which I would recommend a Database table probably, since your inventory will change.

    Type  Model  Motor  Suspension  Trim Rims Stereo etc...

    Truck    F150     V8         HD             XLT    20     CD

    Obviously there would be multiple configurations in this table to cover all of the potential setups such as options on rim sizes, etc.

    Then you would add your selection fields for each attribute. Rims might have three entries with a checkbox bound to the same field but each would equate to a different value.  Another method you could use is to have secondary connections to each of the columns.  Then have a dropdown which would display the unique values.  These could cascade as well but the dropdown for motor would list the unique values in the whole list or all of the possible choices.

    If you were using webservices, you then could dynamically query the master list of configurations and return the ones that matched the choices of the user in a list box or whatever. 

    Or you would load the entire list (probably not good performance if there are a lot of records) and use conditional formating on a repeating table to only display the ones which matched the criteria selected.

     If you would like to see a sample form that is similar, you can send me an email using the contact button.

  • 10-14-2010 12:29 PM In reply to

    Re: Using XPath to populate a list box based on check box selections

    I would like to see an example of this...  I am using two cascading dropdown lists populated from a secondary data source and pouplated one from the other.  The lists are Project Number and Project Name.  When they pick a project number they get all the project names associated with that project number.  But I dont want it to cascade if they dont know the project number...

     Can you email me this example?  [email protected]

  • 10-14-2010 11:22 PM In reply to

    Re: Using XPath to populate a list box based on check box selections

    Greg has a sample on this. Search this site: click Home and search for "Greg cascading dropdowns". Let us know if you can't find it.

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.