Returning a value from a query into an application item
Hi,
I have a insert statement defined in a process which I require that after inserting some data (from which the primary key is fetched from a sequence within a trigger on the table ra_assessments) that this key is then returned into the application item :GBL_CURRENT_ASSESSMENT. The code I have attempted to use is:
begin
insert into ra_assessments values(
NULL,
--rest of the fields here ) RETURNING id INTO :GBL_CURRENT_ASSESSMENT;
end;
Now, this works fine if I want to return into a page level item (say :P2_ID) however it does not appear to return correctly into an application item. The application item is unrestricted.
Any help/suggestions would be very much appreciated.
Thanks