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!

Overwrite retrieved value

696099Apr 22 2009 — edited Apr 22 2009
Hi

We have an existing table that holds several items and a key for a user id (last updated by column). When we open this record we want to change details then save it again as an insert not an update, this allows us to track history. We are using the "Automatic Row Processing (DML)" for this at the moment, so when we look at the text field "P19_CONUSER", the source is set to:

Source Used: Always, replacing ... etc
Source Type: Database column
Maintain Session state: Per session
Source value or expression: conUser

Default Value: PL/SQL Function Body:

DECLARE
var_perid number(6);
BEGIN
SELECT "CS_PERSON"."perid"
INTO var_perid
FROM CS_PERSON
WHERE upper(PERUSERID) = upper('&APP_USER.');
return var_perid;
END;


This PL/SQL seems to work on other pages returning the id of a user based on their username.

In the case above the value shown on the page is from the read record and not that from the pl/sql!!

I think I need to keep the field set to "Source Type: Database column" or the DML won't work when an INSERT is called, is this correct?

I'm obviously doing something wrong here and am not quite sure how to fix this.

Any help would be much appreciated.

Cheers

Darren
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 20 2009
Added on Apr 22 2009
3 comments
322 views