APEX_ITEM.SELECT_LIST_FROM_LOV : how to retrieve selected value ?
wbhoggNov 28 2010 — edited Nov 30 2010Imagine we have a simple table which includes these three fields :
1. LOV_NAME Varchar2(30)
2. LOV_ID integer.
The idea is that LOV_NAME gets populated with the name of a List of Values, from APEX_APPLICATION_LOVS.
Next, we want to show the user the LIst of Values that is controlled by whatever LOV_NAME they selected into the first field.
So - the APEX form has a standard Select List on LIST_OF_VALUES_NAME from APEX_APPLICATION_LOVS.
The page is submitted whenever LOV_NAME changes.
This code will paint the Select List :
htp.p(
apex_item.select_list_from_lov
( p_idx => 1
, p_lov => v('P51_LOV_NAME')
, p_show_Null => 'NO')
);
This works fine - I can see the expected LOV, and I can select a value.
Now ... the next trick is to actually RETRIEVE the selected value, and stuff it into the LOV_ID field
Research so far indicates that I ought to find this value in APEX_APPLICATION_G.F01(1) ... but I am having no luck there.
Can anyone point me in the right direction ?
Thanks,
Blair.