Cascading drop down leaving out entries that repeat... - InfoPath Dev
in

InfoPath Dev

Cascading drop down leaving out entries that repeat...

Last post 08-21-2007 09:16 PM by Agni Jonnalagadda. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 08-07-2007 01:25 PM

    Cascading drop down leaving out entries that repeat...

    Lets see if I can make this a little clearer than mud.  I have 3 cascading drop downs.  Category>Type>Element.  If you select a category, it filters the types down to those in that category and if you select a type, it filters the elements applicable to that type.  This works like a charm all the way down to the unique value filter using preceding-sibling.  BUT, the problem is that all three of these drop downs are populated by the same MS Access table.  So Category repeats several times due to the multiple Types within each Category and Type repeats several times due to the multiple Elements within each type. 

     My problem occurs when I have the same name Elements in 2 different types.  It appears that the preceding-sibling statement that I have on the Element drop down box isn't accounting for the filters so when it comes across the first Element description of say...  "Correct Policy Number" which is applicable to 2 different types, it does not display in the drop down because preceding-sibling perceives it to be the second instance of this Element description even though the first instance is supposed to be filtered out.... 

    Detail:

    Access table has 3 fields (bold).  Field entries are below.  Note that there is a List Bill/Salary Change/Correct Policy AND there is a List Bill/New Hire/Correct Policy.  When I filter to List bill entries in the Category drop down and then to the New Hire entries in the Type drop down, Correct Policy does not show at all and I presume it is because it appears in the table under List Bill / Salary Change first...  I need for it to appear in the type drop down for the filter List Bill / Salary Change and the filter List Bill / New Hire....

    Category / Type / Element

    List Bill / Salary Change/Correct Policy

    List Bill / Salary Change/Correct Division

    List Bill / New Hire/ Correct Policy

    Enroll / Keying Accuracy/ null

    Enroll / Product/ null

    EOI / SSN / null

    Does that make any sense?  THANKS!

     [<b>edited by:</b> hugs4thetrees at 01:32 PM (GMT -8) on 2007-08-07]


    Oh, the preceding-sibling filter I am using on the Element drop down is:
    not(.=../preceding-sibling::d:tblSAAuditItems/@Element)

    I'm using this in conjunction with CategoryName is not = Category and TypeName is not = Type to filter for the selections in the 2 previous drop downs...

  • 08-17-2007 11:02 AM In reply to

    Re: Cascading drop down leaving out entries that repeat...

    Hi,

    Looks like you have two filter conditions one for cascading and other for filtering the repeating stuff, so what you do here is add your Cascading filters first and then set you preceding filter.

    for ex:-

    Category/Type/Element[CascadingFilter][RepeatingFilter]

  • 08-21-2007 07:46 AM In reply to

    Re: Cascading drop down leaving out entries that repeat...

    I am using the wizard though so I have 3 lines:

     CategoryName is not = Category

    TypeName is not = Type

    The Expression not(.=../preceding-sibling::d:tblSAAusitItems/@Element)

    I'm not sure I understand what you are suggesting.  Seems the order I have them in the wizard should work but it's not.  Well, it is... but a bit too well.  I need for it to show all of the Elements in the Category/Type.  When the same element exists in another category/type, it's being filtered out because it seems that the preceding filter pays no attention to the other filters....???  Any way around this or will I have to restructure my table so as not to have the elements repeat at all? 

     THANKS!!!!!!!!!!!!!!!!!!!!

  • 08-21-2007 10:49 AM In reply to

    Re: Cascading drop down leaving out entries that repeat...

    I think your filter should be

    Category = CategoryName
    and
    Type = TypeName
    and
    The Expression not(.=../preceding-sibling::d:tblSAAusitItems/@Element)

  • 08-21-2007 11:13 AM In reply to

    Re: Cascading drop down leaving out entries that repeat...

    Sorry, I had NOT on the brain... 

     I have it set at

    CategoryName=Category

    and

    TypeName=Type

    and

    The Expression not(.=../preceding-sibling::d:tblSAAuditItems/@Element)

    This filters fine except that I don't get of my results due to having some elements in the table multiple times.

    If I change the filter to

    CategoryName=Category

    and

    TypeName=Type

    and The Expression not (.=../preceding-sibling::d:tblSAAuditItems/@Category/@Type/@Element)

    I get closer, I now have all of the entries but some of the Elements repeat due to having another additional breakdown of Subelement in the table.  So the Elements that have Subelements still repeat in the drop down box...  but I DO have all of the items that I need now based on Category & Type.  How do I get the repeating ones to disappear now??

  • 08-21-2007 11:57 AM In reply to

    Re: Cascading drop down leaving out entries that repeat...

    Try out with just this conditional formatting.

    not (.=../preceding-sibling::d:tblSAAuditItems[@Category = CategoryName and @Type = TypeName]/@Element)

  • 08-21-2007 12:08 PM In reply to

    Re: Cascading drop down leaving out entries that repeat...

    Well, it lists everything but there are lots of blank lines and the entries are still listed as many times as they are in the table....

  • 08-21-2007 09:16 PM In reply to

    Re: Cascading drop down leaving out entries that repeat...

    then use this condition this might help

    CategoryName=Category
    and
    TypeName=Type
    and
    not (.=../preceding-sibling::d:tblSAAuditItems[@Category = CategoryName and @Type = TypeName]/@Element)

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