Nested Cascading Filter - InfoPath Dev
in

InfoPath Dev

Nested Cascading Filter

Last post 01-13-2009 08:23 AM by gdgonzal. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 01-09-2009 10:07 PM

    Nested Cascading Filter

    I’m sure my nomenclature is wrong but I will do my best to describe.  I understand how to accomplish cascading filters when you have two attributes within the same repeating group (ex. City/State) when you select the State you are only presented with Cities within that State.  Of course when you do this you end up with a repeating table where there’s a 1:1 between each State and City for every inserted row.  So the user would enter Texas:Houston ; Texas:Dallas; Texas:Austin for each row.  This is close but not exactly the layout I want presented to the user.  Instead I want them to define Texas only once and the then each City within a nested City repeating table, like this:

    Texas    Houston

                   Dallas

                    Austin

    Instead of this:

    Texas    Houston

    Texas    Dallas

    Texas    Austin

    To accomplish my current cascading filter I’m using the method described within this post: http://www.infopathdev.com/blogs/greg/archive/2005/07/14/Create-a-Repeating-Cascading-List-from-a-Hierarchical-Data-Source.aspx ; thx.

     

  • 01-12-2009 06:28 AM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Nested Cascading Filter

    Hi,

    Verify below link.

    http://www.infopathdev.com/forums/p/4134/16298.aspx#16298

     And change second dropdown field as repeating.So that you can insert mulitple entries for First dropdown value.

    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-12-2009 10:22 AM In reply to

    Re: Nested Cascading Filter

    First, thank you for your response...please forgive me for not clarifying as I did have the second as a repeating table, currently My Data Source looks like this:

     Geocoding

         Locations (Group - Not Repeating)

              Regions (Group - Repeating)

                    txtRegion (Text String) - Either North, South, East or West listed within SharePoint List named "Regions" within a single column

                    State (Group - Repeating)

                           txtState (Text String) - All US States each associated within Region (see above) in a SharePoint List named "States" within two columns "Regions" and "State"

    I decided to not use an .xml document and instead attempted to use two SharePoint lists as described above as my Receiving Data Connections.  I am very close to getting this work properly; however, when I applied a filter to my secondary States Data Source (specifically the Regions) it works fine for the first filter selection but afterwards includes States from previously selected Regions. For example if I defined East as the Region I would be presented only with States that fall within the eastern region on the first selection.  Let us say I selected New York from the Easthern and then added another Region, say South....well now I not only see Southern States within the States drop down but I also see Eastern states because New York was previously selected.  I've tried using "current()/my:GeoCoding/my:Locations/my:Regions/my:txtRegion", while the fomula is validating it doesn't work...I don't get anything in the States dropdown when I attempt to use it.  Any assistance would be appreciated...

     


     

     

  • 01-12-2009 11:58 PM In reply to

    • Anuma
    • Top 25 Contributor
      Female
    • Joined on 07-20-2005
    • India
    • Posts 525

    Re: Nested Cascading Filter

    Hi,Add following Rule to Regions dropdown to clear the values from states field when you change the Region value. 
    1. Double-click the Regions drop-down list box.
    2. In the Drop-Down List Box Properties dialog box, click Rules, and then click Add.
    3. Name the rule Clear Regions, and then click Add Action.
    4. In the Action dialog box, select Set A Field's Value from the Action drop-down list.
    5. Click the Select XPath button to the right of the Field text box, and then select “State” field xpath in the Main data source.
    6. Click OK five times to close all open dialog boxes.
    Anuma Chinthapalli /
    http://www.GGKTech.com
  • 01-13-2009 08:23 AM In reply to

    Re: Nested Cascading Filter

     

     Thank you for your continued assistance, I implemented the Rule you suggested but am still experiencing the same issue. I am begining to suspect this is occuring because the State drop-down field is a nested repeating table within the Region repeating table resulting in the current()/my:Region filter not operating as expected and when I hit the State drop-down none of the States are presented.  I've tried to defining the xPath more accurately by using xdXDocument:get-DOM()/my:myFields/my:Locations/my:Regions/my:Region = current()/my:myFields/my:Locations/my:Regions/my:Region but that does not work either

    Because I want to group States by their Regions I want it to look this this to the user:

    Regions      States 

    South         Florida

                     Texas

    East          New York

                     Maine

     

    When I use this format as suggested in http://www.infopathdev.com/blogs/greg/archive/2005/07/14/Create-a-Repeating-Cascading-List-from-a-Flat-Data-Source.aspx the current()/my:Region does work properly but then the format looks like this, which isn't what I'm attempting to achieve: 

    Regions      States 

    South         Florida

    South        Texas

    East          New York

    East          Maine

     

     

     

              

     

     

    Because of the nesting the current()/my:Region filter is not operating as expected. 

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