Refresh Datablock... return to inserted record in block [message #80970] |
Thu, 19 December 2002 13:02 |
Tyler
Messages: 123 Registered: January 2002
|
Senior Member |
|
|
Hello All...
I am doing an insert on a datablock, and then doing and EXECUTE_QUERY to do a refresh.. the problem is that there is a ton of records in the datablock and so after refresh (execute), I want the CURSOR_POSITION on the newly inserted record in the block so that the user can see that it was inserted... any suggestions?
Thanks,
T
|
|
|
Re: Refresh Datablock... return to inserted record in block [message #80973 is a reply to message #80970] |
Thu, 19 December 2002 19:47 |
Evan Briggs
Messages: 12 Registered: November 2002
|
Junior Member |
|
|
I've had that problem myself. The only work around that I could find is:
1) Go to the block.
2) Call the CREATE_RECORD bultin procedure.
3) Fill the fields in the block with the data to be inserted.
4) Then commit.
This will allow the entry of the record without having to execute the query afterwards. It will be entered after the current record at that time and ordered to the right position at the next query point. Some example code is below:
GO_ITEM ('DIVISIONS.DIVISION_ID');
IF (:DIVISIONS.DIVISION_ID = '' OR :DIVISIONS.DIVISION_ID = NULL) THEN
CREATE_RECORD;
:DIVISIONS.DIVISION_ID := :ORGANISATIONS.ORN_ID;
:DIVISIONS.NAME := :ORGANISATIONS.NAME;
COMMIT;
END IF;
Good Luck!!
|
|
|
|
|