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.