I'm looking for a way to set a value in Popup Lov item. I'm using Oracle Apex and I'm trying to set value of Popup LOV with dynamic action. I would like to set a year after to have choosen a date from a date picker and refresh the year in a popup LOV item.
On Apex I've create a popup Lov item called P2_YEAR and a date picker called P2_DATE. On P2_date, I've created a dynamic action (Client-side Condition item not null - P2_YEAR) with two true condition.
First condition: Execute a Pl\sql code to extract the year:
declare
year number;
tmp date;
begin
tmp:=:P2_DATE;
SELECT EXTRACT (YEAR FROM tmp) YEAR
into year
FROM DUAL;
:P2_EXTRACT_YEAR := YEAR;
return;
end;
:P2_EXTRACT_YEAR is an item hidden.
and second condition: an Exectute Javascript code
$s('extractyear',$v('P2_EXTRACT_YEAR'));
On P2_Year I added in Advanced - CSS classes the class name extractyear.
What I would obtain is to show the year in the popup item box and if I push on arrow to show only the year previously extract from the date.
This configuration doesn't work.