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

Need help escaping a pause loop upon errors

Featured Replies

In the database I'm making I have "modal" windows for creating new things (new events, new users, new teams). The scripts that launch these modal windows have a "Pause loop" that only exits if it gets a script result of 0:

Loop

Pause/Resume Script[indefinitely]

Exit Loop If[Get (ScriptResult) = 0]

End Loop

Now the problem I'm running into is that sometimes filemaker will ask the user if they want to revert a record or if they want to save with its own default dialogue. When this happens sometimes the "New <thing>" window will close and the user will be stuck inside the pause loop of the creation script because the save/cancel buttons which return 0 at the appropriate times are now gone so there is no way to leave the loop. User Abort is off so this makes the further problem that they can not close any windows or do anything useful most of the time because it "locks up".

I was wondering if there's a way to prevent/handle those "Do you want to save?" and "Do you want to revert?" windows myself so it doesn't screw up the user by either closing the new record and shifting back to an old record (in which if the user hit "discard changes" button the old record would be deleted) or by closing the current window (leaving them stuck in the pause loop limbo for all eternity muahaha... j/k)

Note: if there's a better solution to preventing a window from closing I would love to hear it.

It sounds as if you have the Layout set to not automatically save changes. Correct?

Do you really need all new records to be created in a modal window? Can you provide an example? I can't picture where they are when they click "New Event." Aren't they on a layout based on an Event TO?

  • Author

Hmmm never mind, it seems either my database was reverted to an older version or someone removed the loops so I don't remember where they were specifically right now to give further details.

I used to have some layouts set to "do not save" because I wanted that functionality for creating new records but every time a user clicked outside of a field filemaker would prompt them to save or not.

If I get some more concrete examples of situations where this occurs in the future (next 2 weeks or so) I'll update this post with more info.

Loop

Pause

error capture on

commit record

exit loop if error = 0

error capture off

end loop

Create an account or sign in to comment

Important Information

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

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.