Insert on a queried form [message #84291] |
Wed, 25 February 2004 08:51 |
dand
Messages: 1 Registered: February 2004
|
Junior Member |
|
|
Hi, I hope you can help.
I use a call_form and execute_query to populate a form with a global_id. The form populates correctly, but what I would like to do is change the data (example name) in the text field and then insert the changes as a new record in the base table, but not update the record that I just modified.
So if I change the name from Sally to John, I would like the John record to be inserted into the table as a new record (I can do this) but I want the Sally record to remain unchanged in the table.
Is this possible ?
Thanks in Advance,
Dand
|
|
|
Re: Insert on a queried form [message #84309 is a reply to message #84291] |
Sun, 29 February 2004 20:07 |
sameer_am2002
Messages: 129 Registered: September 2002
|
Senior Member |
|
|
Ok You do this by:
Create a dummy item to store old value.In When New Record Instance store the old value in the dummy item.
Then in Pre-Update of the block First insert the record in the table with insert statement then restore back the original value which is stored in dummy item.
When-New-Record-Instance
:dummy := :ename ;
Pre-Update
insert into emp (empno ,ename , deptno) values
(:empno , :ename :deptno) ;
:ename := :dummy ;
|
|
|