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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Editable form isn't updating table

Ceci LovelandMar 21 2022

I have an IG with an edit link that populates a form on another page. There is an aggregation/count on the IG to help me see duplicate applications. I do not want to prevent dupes, the loan processors want to see the duplicates to make a determination as to which one to process. (Ergo, I'm not using the automatic DML process for the IG or the Form)
When they click on edit, they go to another page that is a form, laid out with a flow to help them see relevant data. They want to edit three fields on the form. So I have this code to write their changes back to their table. (Rowid is my PK.)
begin
case :APEX$ROW_STATUS
when 'C' then
insert into PLP_PLUSLOANPROC_X ( PLP_USER_ID, PLP_COMMENTS, PLP_COMPLETED_STATUS )
values ( :PLP_USER_ID, :PLP_COMMENTS, :PLP_COMPLETED_STATUS )
returning rowid into :ROWID;
when 'U' then
update PLP_PLUSLOANPROC_X
set PLP_USER_ID = :PLP_USER_ID,
PLP_COMMENTS = :PLP_COMMENTS,
PLP_COMPLETED_STATUS = :PLP_COMPLETED_STATUS
where rowid = :ROWID;
when 'D' then
delete PLP_PLUSLOANPROC_X
where rowid = :ROWID;
end case;
end;

But nothing is updating. When I use the above code on the IG page, they can edit a row in the IG, hit save and this code works properly to update the table. But from the form on another page, it's a bust. What am I doing wrong?

Thanks for any help.
Ceci

Comments

fac586

APEX$ROW_STATUS is only relevant to rows in interactive grids and (historically) tabular forms. It is not supported on DML Form regions and so is returning null on the form page.
The form page process would need to use PK and/or :request values to determine which DML operation is to be performed.

Ceci Loveland

Thanks!
I changed my PK to be the app_id. For now, just to test, I removed all conditions and made it simply an update. I even tried setting the page number of the values, but the code basically never touches the table (with or without the page number). There's no error, nothing is updated though.
update PLP_PLUSLOANPROC_X
set PLP_USER_ID = :P3_PLP_USER_ID,
PLP_COMMENTS = :P3_PLP_COMMENTS,
PLP_COMPLETED_STATUS = :P3_PLP_COMPLETED_STATUS
where PLP_APP_ID = :P3_PLP_APP_ID;

I'm obviously misunderstanding something.

fac586

What is logged when the page is submitted in debug mode?

Ceci Loveland

I figured it out. It was a dumb mistake. I hadn't set the execution options to be "once per page visit" instead of per session.
Thank you!

1 - 4

Post Details

Added on Mar 21 2022
4 comments
330 views