This content has been marked as final. Show 7 replies
forms6i my guess u r using...
U can use after query
E.g if my cursor was on record 6 before commit , I want it to remain at record 6 after commit . How to achieve that ? I don't want my cursor to be on record 1 by default.
What is the purpose you want to use below code on commit trigger. In your code, there is not COMMIT found,, that means are you not saving record>
However , use key commit on block level and do not give execute_query - so you will find your record pointer(mouse) where you leff,.
In case you have any particular reason, mention here... to get more idea
Hello , I have a multi record form . After save , my cursor position moves to the first record ,doesn't stay at the position of the record where save has been done ..
I use the following code in my key-commit trigger
I need to use this as after each save the record is sent to a history table and have to refresh data on each block ..
Any help please ? Thanks.
If you issue a CLEAR_FORM or an EXECUTE_QUERY, the record-position will be lost.
1. Don't do the CLEAR_FORM and EXECUTE_QUERY or at least tell us why you need it.
2. Store the current record's PK-value before the CLEAR_FORM, then loop over the records after the query until the formerly stored pK-value is reached.
Edited by: Andreas Weiden on 02.05.2013 17:47
thanks , I really need to Don'EXECUTE_QUERY again to refresh data on screen.
Can you please explain how to store the current record's PK-value before the CLEAR_FORM, then loop over the records after the query until the formerly stored pK-value is reached ? This might help me .
:CONTROLBLOCK.PK:=:DBBLOCK.PK_ITEM; .. EXECUTE_QUERY; LOOP EXIT WHEN :SYSTEM.LAST_RECORD='TRUE'; EXIT WHEN:DBBLOCK.PK_ITEM=:CONTROLBLOCK.PK; NEXT_RECORD; END LOOP;
Call it my obsession with parameters or same likes of our end users..
But, you can simply do one thing, create a forms parameter with initial value as 1. Now, replace your code with this code..
:parameter.current_rec := :system.trigger_record;
hope this works...