Jump to content

Need help escaping a pause loop upon errors


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

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 4380 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
 Share

×
×
  • Create New...

Important Information

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