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 Next Record / Exit After Last Not Working

Featured Replies

  • Newbies

How do I get the loop, see below, to exit after it has checked the last record? I've tried doing the same thing with Next Record - Exit After Last, but the script exits after only one iteration. It doesn't continue even though I've checked Exit after Last.

Loop

If ["Contact = "N_A""]

Set field ["Contact = "Not Applicable""]

Else

Omit Record

End If

End Loop

KKelly:

Welcome to the Forums.

The end of your script should be:

End If

Go To Record [next, exit after last]

End Loop

Also, you should put in Go To Record [First] before the beginning of your loop.

-Stanley

  • Author
  • Newbies

thanks for the help. however, the script now seems to skip a record whenever Contact does not equal N_A, because it omits, ends the if, then goes to next without checking the one it's on.

Hi kkelly

[color:red] Update your Profile to reflect the version of FileMaker, OS, and Platform you are using.

Version 6 and 7:

You can also just do a simple Find and Replace to accomplish this.

Put your cursor in the Contact field, and then Go to Main Menu >> Edit >> Find/Replace.

Find:

N_A

Replace

Not Applicable

Direction = [color:blue] All

Search Across = [color:blue] All Records

Search Within = [color:blue] Current field

Or,

Perform a Find in Contact field for "N_A"

Go To Main Menu >> Records >> and Click on Specify and enter this calculation in the Box

Substitute YourTextField; "N_A"; "Not Applicable")

HTH

Lee

I see it a bit differently ... in reverse actually (typical, huh?). You wish to end up with a set of "Not Applicable" records when finished setting them, right? And that's why you are Omitting? Try this:

Go To Record/Request/Page [ First ]

Go To Field [ anyField ]

View As Form

Freeze Window

Loop

If [ Contact <> "N_A" ]

Omit Record

End If

Set Field [ Contact ; "Not Applicable" ]

Go To Record/Request/Page [ Exit After Last; Next ]

End Loop

It appears to do what you wish and leave you with your proper found set of "Not Applicable." I added the View As Form, Freeze Window and Go To Field[] steps because they substantially speed up looping Set Field scripts in addition to claiming possession in multi-user.

Wholly cow,

The way the site is acting today, everyone is responding to everyone else, and not the one they are directing their response to.

Lee

Funny.

The Site, I mean.

  • Author
  • Newbies

Thanks everybody. I've figured got it dialed in now.

The Go To Record [Next, Exit after last] step should actually be directly after the Set Field step in KKelly's original script. And LaRetta's should have an Else If, followed by the Set Field and GTRN steps, or it omits, sets the next record as "Not Applicable", without testing it, and then continues to the next record.

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.