I have a LOV of years and when I select a year , I would like to pass the year to the Department LOV sql query to list it according to the year passed. I have read several posts and i am very close to make it work but still missing something.
- From year "select list" , I have updated the year select list value to submit when the value is changed
- I was hoping , when the value has been submitted to the server, it would keep the value and pass it to my SQL query where I am using the variable (:PO_R_YEARS_N)
- But still I am unable to get the variable value passed to the Department item SQL query

When "Year" (PO_R_YEARS_N) select list is updated, "Department" (PO_R_DEPT_N) select list should be updated.
I run the below query in PO_R_DEPT_N item:
select dept, id from (
select distinct decode(dept,'ALL','All Departments',dept) dept, to_char(dept) id
from apex_ebs.apex_dept where category = 'ORG'
and length(id) = 3 and allot_yr = :po_r_years_n
--union all select 'GEO' dept, 'GEO' id from dual
)
If I , pass the sysdate year then the query runs but not with a variable
Any help ?
Kr,
Switzer