J
Justin
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 got a suggestion to try:
not(. = ../preceding-sibling::d:LookUp[@Type = current()/my:Type[@Area
= current()/my:Area[@RESULTS
= current()/my:RESULTS]]])
Wherer @Type, @Area, @RESULTS nodes come from the secondary. 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.
I have been completely and utterly unnsuccessful in implementing a
filter inside brackets. Any help would be greatly appreciated.
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 got a suggestion to try:
not(. = ../preceding-sibling::d:LookUp[@Type = current()/my:Type[@Area
= current()/my:Area[@RESULTS
= current()/my:RESULTS]]])
Wherer @Type, @Area, @RESULTS nodes come from the secondary. 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.
I have been completely and utterly unnsuccessful in implementing a
filter inside brackets. Any help would be greatly appreciated.