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.

How do I detect if Import was cancelled by user?

Featured Replies

Hello,

I was wondering how you detect if the user has cancelled importing. I have the Import[] in a script and would like to conditionally perform some operations after that line - depending on whether the user did import the file or cancelled out.

thanks for your help in advance,

sincerely,

J__

Set Error Capture [on]

# Do not put any steps -- not even comments -- between

# the Import and the Set Field otherwise the error code

# from the import is lost.

Import []

Set Field [ gError, Status( CurrentError )

Set Error Capture [off]

If [ gError = 0 ]

# Import completed normally.

Else

If [ gError = 1 ]

# User Cancelled Action.

Else

# Some other error prevented the import from completing.

End If

End If

  • Author

Vaughan,

thanks

Status (CurrentError) - filemaker does not recognize. I'm using Fm7 and I think that routine is no more right? should it be Get ( LastError ) instead?

Question: You mention above that you should not place comments between set error capture and Import[] - is this typical for any errors you want to catch - for example, when a user cancels out of printing do you lose the error code there too if you have comments?

if so, wow, once instance when comments are bad eh?

thanks for the response,

sincerely,

J__

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.