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!

How to get newly inserted row's ID from a PL/SQL process into a hidden item?

DannyS-OracleAug 18 2016 — edited Aug 19 2016

Hi guys, I hope someone can help me with this problem:

I knew we normally use Automatic Row Processing and set the "Return key into item" attribute to the hidden item, but I did some processing before the insert process so i want to do the insert operation manually:

declare

     l_id number;

begin

     /* do some things here */

     insert into table_name(col_1, col_2) values(val_1, val_2) returning id into l_id;

     :P1_HIDDEN_ITEM := l_id;

end;

I tried to set the hidden item with the most recent item's ID as described in the code above, but it just doesn't work ... please let me know if you have better solution for this. Thanks!

P.S. I am using Apex v5.0.4

This post has been answered by DannyS-Oracle on Aug 19 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 16 2016
Added on Aug 18 2016
3 comments
3,835 views