Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Go to Record Next - won't exit after last!

Featured Replies

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?

Hello:

Sounds like you need the End Loop step in there after Go to Next exit after last. Do you have this?

Ken

  • Author

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?

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.

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

  • Author

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!

"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.

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...

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.