Sql Query in data container related to selected fields


Can you also help me to get an running sql query based on the selected departments?
I have a browse screen with all departments. Then I can select a department and need to have a lookup field based on a sql query and the selected departments:

The followinf query:
Select e FROM l2s_Department e
WHERE e.dept_fk_dept IS NULL
AND e.dept_number <> :selecteddepartmentID
ORDER BY e.dept_number

I wanted to get the ID of the selected department in :departmentDC.

But got the error :slight_smile:IllegalStateException: Query argument departmentsDC not found in the list of parameters provided during query execution.

Thanks Thomas


The exception message says that :departmentDC parameter is not set.
If you use this query in the loader, you can see how to set parameters and load data in the Data Loaders documentation.
Also, see DataManager documentation.