Home » Developer & Programmer » Forms » Looping in form using first record next record
Looping in form using first record next record [message #397441] Fri, 10 April 2009 13:53 Go to next message
cool_coder
Messages: 17
Registered: September 2008
Junior Member
Hi,

I am having issues with a form which processes all the records in a block ABC..

Code is below and sometimes it skips multiple record and somtimes one record..

---------------------------------------------------
GO_BLOCK(ABC');
FIRST_RECORD;
loop
processing --

NEXT_RECORD;
exit when :SYSTEM.LAST_RECORD = 'TRUE';
end loop;
---------------------------------------------------

in my view , NEXT_RECORD should come after LAST_RECORD = 'TRUE' call..and that is responsible for skipping one record from processing....and not able to justify multiple skips...

any other thoughts?

Thanks
Re: Looping in form using first record next record [message #397446 is a reply to message #397441] Fri, 10 April 2009 15:12 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Behaviour you have described is inconsistent (sometimes one record is skipped, sometimes many of them) so it is difficult to guess what might be going on.

I'd suggest you to include one (or a few) MESSAGE statements into the loop which will guide you through loop execution.

Or, if your Forms Developer version supports it, enable debugging.
Re: Looping in form using first record next record [message #397566 is a reply to message #397441] Sun, 12 April 2009 13:18 Go to previous messageGo to next message
expertsudhir
Messages: 26
Registered: October 2008
Location: Delhi, India
Junior Member

use like this:

GO_BLOCK(ABC');
FIRST_RECORD;
loop
processing --


exit when :SYSTEM.LAST_RECORD = 'TRUE';
Next_Record;
end loop;


now There will no any problem......
Re: Looping in form using first record next record [message #398005 is a reply to message #397441] Tue, 14 April 2009 15:40 Go to previous message
cool_coder
Messages: 17
Registered: September 2008
Junior Member
Thnaks all for your inputs.
Previous Topic: Update Form
Next Topic: Problem in customization
Goto Forum:
  


Current Time: Fri Sep 20 12:28:16 CDT 2024