Mr R
Mr R

Reputation: 311

APEX LOV Display value look up

Is it possible to reference a LOV in plsql?

I need to get the display value from a static LOV from PLSQL to use as a filter on an interactive report.

I have trawled the documentation and google but there is no reference to being able to reference a LOV via plsql.

Any help gratefully received

Upvotes: 0

Views: 6357

Answers (1)

Tony Andrews
Tony Andrews

Reputation: 132570

You can access the value of an item that has a LOV - that's usually what you want:

select ename from emp
where deptno = :p1_deptno -- P1_DEPTNO is a page item based on an LOV

For static LOVs you can access the display value like this:

select display_value
from apex_application_lov_entries
where application_id = 123
and list_of_values_name = 'DEPT_LOV'
and return_value = :p1_deptno;

For dynamic LOVs you would have to run the query the LOV is based on. This can be obtained from view apex_application_lovs

Upvotes: 4

Related Questions