Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing a variable from one item "select list" to list another item "select list".

user8213219Feb 11 2020 — edited Feb 12 2020

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

pastedImage_4.png

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

This post has been answered by mbouchi on Feb 11 2020
Jump to Answer
Comments
Post Details
Added on Feb 11 2020
8 comments
1,095 views