cascading drop downs with unique filter - InfoPath Dev
in

InfoPath Dev

cascading drop downs with unique filter

Last post 10-19-2006 12:54 PM by trufooser. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 10-17-2006 10:46 AM

    cascading drop downs with unique filter

    I have several cascading drop down boxes, all dependent on the previous selection. The problem is, the filters are not working properly. Below are what the cascading choices look like in the DB:

    TYPE AREA RESULTS

    MRI | knee | normal
    MRI | knee | abnormal
    xray | knee | normal
    xray | knee | abnormal

    this will cycle through a bunch of different body parts as well as other things.

    I have 3 filters in place for the results node. The first filter filters the type, the second filter does the area, and the final filter is a unique record filter.

    Type(from secondary) = current()/@Type
    Area(from secondary) = current()/@Area
    not(. = ../preceding-sibling::d:LookUp/@Type)

    Now, using my vulcan logic, I thought the filters would work in squential order, ie, first, it would take only records passing the Type filter, then from that pool, take only the records passing the Area filter, then finally applying the unique record filter. However, this is not the case.

    It seems to perform the filter conditions simultaneously. Using just the records from above, if I were to select MRI in the Type DD, everything would be hunkey dorey, I would be able to continue on normally. Only one option for knee would appear in the Area DD, and I would be able to select a Result.

    However, if I were to select xray, because it falls after MRI in the database, the area DD List would contain no choices. I just dont understand WHY it does that. So then I looked around and found these two resources:

    http://infopathdev.com/forums/topic.asp?TOPIC_ID=2762&SearchTerms=cascading,dropdown

    and

    http://www.infopathdev.com/howto/tutorials/default.aspx?i=075c4e8e56db4fa5bd63615b712c0d91

    They both talk about putting additional filters inside a filter statement.

    The tutorial suggests this method
    not(. = ../preceding-sibling::Vehicle[@year = current()/my:Year]/@make)

    Where the thread suggests doign this
    /dfs:myFields/dfs:dataFields/dfs:Form_Data/@Category[not(. = ../preceding-sibling::dfs:Form_Data/@Category)]

    I have been completely and utterly unnsuccessful in implementing a filter inside brackets. Any help would be greatly appreciated.
  • 10-18-2006 09:39 PM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: cascading drop downs with unique filter

    Hi Trufooser,

    Can you try below filter once.

    not(. = ../preceding-sibling::d:LookUp[@Type = current()/my:Type[@Area = current()/my:Area[@RESULTS
    = current()/my:RESULTS]]])

    In above filter @Type, @Area, @RESULTS nodes from secondary.
  • 10-19-2006 12:54 PM In reply to

    Re: cascading drop downs with unique filter

    Thanks, but so far, I am unable to get that to work. I'm unsure of the difference between 'my:' and 'd:', and just for $h|7$ and giggles i tried @. None of the combinations worked. The only filter that did work was the unique value filter.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.