Filter a drop downbox by another drop down box - InfoPath Dev
in

InfoPath Dev

Filter a drop downbox by another drop down box

Last post 03-03-2008 12:50 AM by Nightfall. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-28-2008 05:29 AM

    Filter a drop downbox by another drop down box

    Hello all,

     I have 3 drop down boxes (named : cmbTest1 , cmbTest2, cmbTest3)

    cmbTest1 has 4 values, let's say : 1.ValueA, 2.ValueB , 3.ValueC , 4.ValueD

    cmbTest2 has around 10 and they should be filter by cmbTest1 (when I select f.ex ValueA I want only 3 choices in cmbTest2).

    Similar cmbTest2 will filter more values in cmbTest3.

    Is ther an easy way to do it ? Should I write vbscript on OnAfterChangeEvent ?

     
    Thanks and best regards,

     
    Alex
     

  • 02-28-2008 10:01 AM In reply to

    Re: Filter a drop downbox by another drop down box

    Hi Alex, welcome to the forum.

    If you search on "cascading dropdown" you will find some blogs and post for what you need.

    Essentially you put a filter on the dropdown source referencing the previous dropdown selection.

  • 02-29-2008 03:22 AM In reply to

    Re: Filter a drop downbox by another drop down box

    Many thanks ! I'll have a look ! 

    On most of the information I found  the dropdowns receive the data from an external source (xml,db,web service).

    Is there a way to do all in the form ? The values of the combo boxes are fixed and I don;t need to get the from a db.

     

     

  • 02-29-2008 07:00 AM In reply to

    Re: Filter a drop downbox by another drop down box

    Put them in an xml file and then when you setup the data connection to the XML select to include the file with the form.

  • 02-29-2008 07:48 AM In reply to

    Re: Filter a drop downbox by another drop down box

    Great I didn't know I could do that ! That's what I hoped for.

    I'm starting to like Infopath more and more every day ! 

     

  • 02-29-2008 08:06 AM In reply to

    Re: Filter a drop downbox by another drop down box

     Sorry to bother again but I'm trying to implement this :

    http://www.infopathdev.com/blogs/greg/archive/2005/07/14/Create-a-Repeating-Cascading-List-from-a-Flat-Data-Source.aspx

    but I don't know how to format my xml file correctly. Since my 3 dropdown are not in a repeating table and the don't belong to a group

    how should I format the xml file ?

     

    Thanks again ! 

  • 02-29-2008 09:47 AM In reply to

    Re: Filter a drop downbox by another drop down box

    Typically you would need data that has all of the elements.

    I will use an example country, state, city.

    Three dropdowns which cascade to drill down from country to states within that country and then cities within that state.

    You data could look like.

    USA    WA   Seattle

    USA   WA    Spokane

    CAN   BC    Vancouver

    USA   OR   Portland

    CAN  BC   Victoria

     This would be a secondary data connection and you would end up with a repeating group of these three fields.

    So DD1 would be bound to country

    DD2 would be bound to State and use a filter on countryselected in DD1

    DD3 would be bound to City and use State as a filter from DD2

    You also could have a list of Countries and States and then another list with States and Cities but you need the data to relate them together.

     Is that what you were looking for?

  • 03-03-2008 12:50 AM In reply to

    Re: Filter a drop downbox by another drop down box

    Thank you very much I sorted everything out (I spend some time during the weekend and everything was pretty clear).

    Many thanks again ! 

Page 1 of 1 (8 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.