Filtering Cascading Dropdowns Filters Too Much Out - InfoPath Dev

InfoPath Dev

Use our Google Custom Search for best site search results.

Filtering Cascading Dropdowns Filters Too Much Out

Last post 06-07-2009 09:36 AM by Shanty. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-07-2009 09:36 AM

    • Shanty
    • Not Ranked
    • Joined on 01-06-2008
    • Posts 8

    Filtering Cascading Dropdowns Filters Too Much Out

    I am trying to get 3 cascading dropdowns to display unique values filtered on a previous dropdown.  Although I can get it to EITHER display a complete list of unique values OR display filtered (but duplicate) values based on a selection in a previous dropdown, when I combine the 2 filters, the values ARE unique and ARE explicit to the filter BUT there are values now missing.  The dropdowns are populated from a Secondary Data Source (a SQL query).

    I have 3 tables that are used in the SQL query. Below I show the tables and the pertinent fields used in the query from each table with the KEY of the table bolded and the JOIN field italicized (where there is one).  Because each of the first three tables listed have many to many relationships (i.e. - within each "Location" can be many "Company" and each "Company" can be located at many "Location"), the 4th table was created to mitigate issues and contains only key and join fields.  As you can see, the Join fields of the fourth table are similarly named to that of the KEY fields in the main tables.


    1. Location - LocID, Location 
    2. Company - CompanyID, CoyName
    3. Department - DeptID, DeptName
    4. LocationCompanyDept - LCDID, Loc_ID, Company_ID, Dept_ID


    Combines all tables above and pulls all data for the fields listed in the above tables. 


    1. Loc - displays the name of the Location.  The XPath statement used here effectively displays unique values of the various locations:  not(.=../preceding::*/@Loc)
    2. CompanyName - not(.=../preceding-sibling::*/@CompanyName) AND Loc = Location (filters on the Location of the form being the same as the Location in the query).  This is the one where, after combining the filters, the values displayed are incomplete.
    3. Dept - this dropdown will filter on both Loc and CompanyName values as it too has a many-to-many relationship with the other two dropdowns.  I have not completed this one as I am pretty sure that once I get the CompanyName dropdown figured out, this one will follow suit.

    I have tried various methods including:

    • adjusting the SQL query to place the filter inside of it.  Not a very efficient or subsequently useful idea.
    • modifying the XPath - but my understanding of XPath is limited so this is mostly guess work
    • spliting the query into multiple ones - but this slows down the form too much with the additional data connections.

    Any help I can get on this would be greatly appreciated as this will be the template for several forms used by our company and completion of those is pending this one.


    Thanks all,

    - Shanty




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