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.

Open file script fails after user Cancels

Featured Replies

The script Opens a file. If the user hits the Cancel button during the log-in, the script will never open that file again until the database file containing the script is closed and reopened. The FileMaker application does not have to be restarted.

I have tried Get(Last Error). It returns the error, but does not "reset" whatever is going on.

Any suggestions?

Lynn

Allow user abort: off ?

  • Author

I have tried it with Allow user abort ??? on and off and without Allow user abort in the script. Works the same in all cases.

If you have Allow User Abort [Off] before the call to open the external file, a user should not be able to click any Cancel button, because only Continue would exist. If you Hide and Lock the status area, neither button will be accessible, by the way.

"the script will never open that file again until the database file containing the script is closed and reopened"

You should only have to perform the script again, not have to close the file. If the script is run when the file opens and there is no other way for the user to perform the script, then it's an interface/design issue.

Maybe if the user cancels the script change to a layout with a big button on it "Try Again" that performs the open script.

  • Author

Maybe I was not clear in my original post.

The script runs when the file (file A) opens.

Set Error Capture [On]

Open File ["Vendor File"]

If [Get ( LastError ) <> 0]

{corrective Action goes here}

When the Open file step executes, the user is asked for Account and Password for the Vendor File.

If the user hits Cancel in the log-in dialog (NOT the Cancel Script button), Get ( LastError) returns 1.

Re-running the script does not open the Vendor File or give a log-in dialog. I have to close file A (containing the script) and reopen it before the script will attempt to re-open the Vendor File.

Hmmm... FMP 7.... it may well be another "difference" between FMP 7 and FMP 6. Or a bug.

  • 9 months later...

I have a similar problem. When the user hits the ESCAPE key, the entire script is exited. Allow User Abort (Off) doesn't stop it! I'm using FM7 v3

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.