dbTalk Databases Forums  

Detecting last record in a found set in a script step?

comp.databases.filemaker comp.databases.filemaker


Discuss Detecting last record in a found set in a script step? in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Richard Kayton
 
Posts: n/a

Default Detecting last record in a found set in a script step? - 06-21-2005 , 09:14 AM






I have a script that cycles through records in a found set. How do you tell
when you have processed the last record in the set? The current error status
remains 0 when you recquest another record but there are none.


Reply With Quote
  #2  
Old   
Richard Kayton
 
Posts: n/a

Default Re: Detecting last record in a found set in a script step? - 06-21-2005 , 10:02 AM






I am not sure what you mean below where you exit on last. As far as I can
tell there is no explicit status that indicates that you have reached the last
record in a found set. The closest seems to be the current record number but
what happens after you process the last record and then do a skip to the next
record?

Sincerely,



In article <slrndbg8p9.ae.t-use (AT) ID-685 (DOT) user.individual.de>, t-use (AT) gmx (DOT) net
says...
Quote:
On Tue, 21 Jun 2005 10:14:56 -0400 (EDT), Richard Kayton wrote:
I have a script that cycles through records in a found set. How do you
tell
when you have processed the last record in the set? The current error
status
remains 0 when you recquest another record but there are none.

goto next record. exist on last

... should do what you need.

Otherwise you might do an extra check whether the current record number
= found numnber. Pick the matching get functions.


Reply With Quote
  #3  
Old   
Matt Wills
 
Posts: n/a

Default Re: Detecting last record in a found set in a script step? - 06-21-2005 , 10:43 AM



There is no need to look at any status.

In the script which cycles through the records, you have a loop, at the
end of which is a "Go To Record/Request/Page step. Click on that step.

At the bottom right of the script definition window is where you tell the
step which record to go to: first / last / next / previous / by number /
by field value. Assuming you have "next" selected, to the left of the
selection there is a checkbox option "Exit after last." Check that.

That's all.

Matt

On 6/21/2005, Richard Kayton wrote:

Quote:
I am not sure what you mean below where you exit on last. As far as I
can
tell there is no explicit status that indicates that you have reached
the last
record in a found set. The closest seems to be the current record
number but
what happens after you process the last record and then do a skip to the
next
record?

Sincerely,



In article <slrndbg8p9.ae.t-use (AT) ID-685 (DOT) user.individual.de>, t-use (AT) gmx (DOT) net
says...

On Tue, 21 Jun 2005 10:14:56 -0400 (EDT), Richard Kayton wrote:
I have a script that cycles through records in a found set. How do
you
tell
when you have processed the last record in the set? The current
error
status
remains 0 when you recquest another record but there are none.

goto next record. exist on last

... should do what you need.

Otherwise you might do an extra check whether the current record number
= found numnber. Pick the matching get functions.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.