Home » Developer & Programmer » Forms » How to hold cursor on updated record? (Db11g, form 6i)
How to hold cursor on updated record? [message #665230] Sat, 26 August 2017 10:46 Go to next message
Amjad_1975
Messages: 52
Registered: January 2017
Member
My question is this I am updating the qty in pos system everything is working fine but cursor is not holding the same updating record which i am updating untill i insert a next record cursor is moving to the next record cursor should be on 2222 record but moved to next record as I mentioned in uploaded. Png deffinately i have used some logic like next record etc may i have mistaken somewhere if i try to changed the logic whole logic is disturbing is there any possibility we can hold the cursor on same record which we are updating .
Declare 
 L_match Boolean: =false;
L_continue Boolean:=true;
Begin
Go_block('emp');
First_record; 
While l_continue and not l_match loop
If :emp.cc=:control.zz then
:emp.qty:=:emp.qty+1;
L_match:=TRUE;
Else
If :system.last_record! ='True' then
Next_record; 
Else
L_continue: =false;
End if;
End if;
End loop;
Next_record; 
Something like this.................

Kindly guide me


[LF merged 3 topics and deleted 2 duplicate messages]
  • Attachment: POS.png
    (Size: 57.07KB, Downloaded 19 times)

[Updated on: Sat, 26 August 2017 16:02] by Moderator

Report message to a moderator

Re: How to hold cursor on updated record? [message #665235 is a reply to message #665230] Sat, 26 August 2017 16:14 Go to previous messageGo to next message
Littlefoot
Messages: 21234
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It is difficult to read your question as you don't use any punctuation. Sentences are here to distinguish one thought from another. In your case, everything is written in one sentence so I have no idea where one of them stops and another one begins. Perhaps you should pay more attention to quality of your messages.

Furthermore, how nice of you to use [code] tags! It would be even better if you properly formatted code; the way it is written now, it is (again) difficult to follow its execution.

Anyway: it appears that you are looping through all records in a block. If you want to return to current record, store its ordinal number (:SYSTEM.TRIGGER_RECORD) into a variable and - once you're done with the code you use - return to that record using the GO_RECORD built-in.
Re: How to hold cursor on updated record? [message #665239 is a reply to message #665235] Sun, 27 August 2017 07:37 Go to previous message
Amjad_1975
Messages: 52
Registered: January 2017
Member
Sorry sir to could not explain properly as well as code tag sir I would check as you suggested I will let you know soon

Thanks & best regards
Previous Topic: Configuration LAF with Forms
Next Topic: How to Open Word document and save into table
Goto Forum:
  


Current Time: Mon Nov 20 11:26:22 CST 2017

Total time taken to generate the page: 0.03059 seconds