I don't understand how to "[p]opulate that [i.e. the department code to be obtained from the first list, using the ID from the first list] into the Cost Code query.
My first control is called the Sponsoring Department lookup. It is a drop down single selection control. It displays all rows from the Department Numbers and Names and Divisions list. I have that control configured to use for display name the title column (which is the department name), but to use the ID as the value (as was recommended previously in this thread). No filtering was done. The Entries path is: /dfs:myFields/dfs:dataFields/d:SharePointListItem_RW.
When I test this control, I see the department names as expected.
My second control is intended to show rows from the Departments Cost Codes and LAP Codes list, filtered into just those with the department selected from the first control. It is a single selection dropdown.
Here's what I tried but it is not working.
The correct data source, that points to the list I mention, is selected. The entries says this:
/dfs:myFields/dfs:dataFields/d:SharePointListItem_RW[d:Department_x0020_Code = xdXDocument:get-DOM()/dfs:myFields/dfs:dataFields/my:SharePointListItem_RW/my:Sponsoring_x0020_Department]
To get that, what I did was select the d:SharePointListItem_RW from the dataFields portion of myFields.
Within the Filter Data dialog, I selected the Departments Cost Codes and LAP Codes data source, opened the d:SharePointListITem_RW dataField,
and selected the Department Code parameter.
I selected the is equal to condition.
I selected the Main data connection dataFields > my:SharePointListITem_RW > Sponsoring Department
When I try it, nothing appears in the drop down.
Since that is the case, my guess is that in my limited understanding, I selected something incorrectly here in the filter.
However, I have read various articles and still don't understand exactly what the correct thing to select is, if this is wrong.
I hope someone can help me understand this better.
Also, how do I control what datasources run when the form opens? There are 4 lookups in this form and 3 of them need to go at start up and one, which is filtered on the selected department code, would only go once.