Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8098 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a script that's scrolling through and running a test on 73 found records of a 78 records set. IT runs in a loop, and it has a step saying Go to Record (Next, Exit After Last), but it just runs, in an infiinite loop, on the last record.

Ideas why?

Posted

Apparently there's something I don't udnerstand.

The help files say that checking the exit after last makes the script, when it reaches the lst record, exit the innermost control structure, which would be, in this case, a loop. So... why isn't it exiting? And why do I need an Exit loop command?

Posted

Is there a "Go to Record/Request [first]" script step INSIDE the loop? This would keep the script from ever getting to the last record.

Posted

Ive had a lot of fun with loops. You might want to try:

Set Error Capture [On] (Do this so you can get out of loop)

Enter Find Mode []

(Whatever your finding)

Perform Find

Go to record/Request/Page [First]

Loop

(Your critera here) (This will perform on 1st record)

Go to record/Request/Page [Exit after last, Next]

End Loop

I agree with Vaughn dont put Go to record/Request/Page [First]

in the loop or as you have seen it will loop forever.

Dean

Posted

Remarkably enough, the code you guys just sent is almost EXACTLY what I had in there, except for one important difference - I didn't have the go to record(first) in there at all! So I put it in outside the loop, and it worked. I'm not sure why it looped forever - after all, if it entered the loop, and it was alerady on the last record, wouldn't it just do one iteration of the loop - but that fixed it. It was a fault in logic anyway - I needed it to loop the whole found set every time, and just forgot to reset the pointer, as it were - but nonetheless, it doesn't seem like it should have solved this problem. But there you have it. THanks for your help!

Posted

"Go to record ... Next" has always been a bit... quirky. I don't know why, but if you don't have it set up just right (as was pointed out above), it just keeps going or doesn't get the right information at all.

Posted

If your database is already on the last record when you call the Go To Record [Exit after last, Next] command, then the command fails because there is no next record, and having failed its parameters cannot be applied, including the 'exit' request.

I suspect that may be why you were having trouble...

This topic is 8098 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.