Hi there,
I have a problem regarding a filter on cascading dropdown boxes. The data to be displayed in the dropdown boxes are held on tables in an Access database.
The relationship between the three dropdown boxes looks like this:
Project --> Subproject --> Technical Product
The Project and associated Subprojects are held on one table. The Technical Products are held on a separate table; the field that links the two tables is Subproject.
When I select a Project from the Project dropdown, I see a list of associated Subprojects in the Subproject dropdown. When I select the Subproject I should see, in the Technical Products dropdown, a list of Technical Products associated with the Subproject. This is the filter, with which I#%92m having problems.
A Technical Product can be associated with more than one Subproject, which seems to be causing the problem.
Example data in the Technical Product table:
Subproject ------ Technical Product
EAB_EBA --------- CC_EBA
EAB_EBA --------- WR_Tools
EBA_FM ---------- CC_FM
EBA_FM ---------- CC_SHM
EBA_FM ---------- WR_Tools
In the example above, the Technical Product dropdown displays both of the Technical Products when EAB_EBA is selected as the Subproject, BUT it only displays the first two Technical Products when EBA_FM is selected, ignoring WR_Tools.
I have the following filters on the Technical Product dropdown:
The expression not(. = ../preceding::d:TA_Products/@TA_L2) and
QCP_Subproject = TA_Subproject
where QCP_Subproject is the Subproject selected by the user, and TA_Subproject is the Subproject from the Technical Products table.
If I remove the expression from the filter, the Technical Products dropdown displays multiple instances of all three Technical Products, which is what I would expect.
I#%92ve noticed this problem with every Technical Product that is associated with more than one Subproject. The Technical Product is always displayed with the first Subproject in the list from the Projects table.
I#%92d be grateful for any suggestions. I#%92ve tried sorting the Technical Products table by Subproject and Technical Product but to no avail. I#%92ve tried using a query run against the Technical Products table, sorted by the above two fields, again to no avail. I#%92ve also tried using preceding-sibling but that makes no difference.
I've used filters before, and have worked through the various tutorials available on InfoPathDev, but nothing has helped so far!
Thanks and regards,
Pete