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.

Insert File suppress dialog box possible?

Featured Replies

Does anyone know a way to suppress the dialog box that pops up when Insert File fails to find the file in the path? I'd like it to just die quietly. Set Error Capture On doesn't help.

That's funny, I was just dealing with that same problem today. The problem for me was that the container field on some records would throw up a dialog when I tried to export the field contents -- apparently a side effect of how the image was pasted into the field. No error is generated, so there seemed to be no way to stop the dialog. Since I wanted to loop through and export these images, I resorted to this utility I found:

Push That Freakin' Button (PTFB)

(Apparently an older freeware version, but it seems to work fine on XP. A newer shareware "Pro" version is also available.)

But Chris, I do indeed get an error when I try to import a file that's not available. In fact, that's how I trap for whether my export failed: I attempt to import the file back into a global container field.

  • Author

Thanks! I'll try that.

I'll double check my script. I am able to trap an error, but the darn select file dialog still pops up.

Are you specifying the file path with a variable or what? I don't see why the dialog box should appear when "Specify source" is selected in the import script step options.

  • Author

Yes, I'm using a variable to specify the path. Sometimes the file isn't there, and that's expected, but I'd like FileMaker to handle the condition, not punt back to the user to figure out. I've attached an example file.

InsertFile.zip

  • 1 year later...

I am having the same problem you expierenced. What was your solution?

  • 4 years later...
  • Newbies

In case anyone else comes across this post (like I just did) while searching for a solution, I found one:

 

• Create a Global Container field

• Put the field on the same layout you're on during the Insert File script (it can be in the non visible scratch area to the right)

• Add the following to your Insert File script, before the Insert File command:

 

  - Set Error Capture [On]

  - Insert from URL [select; No dialog; Table::GlobalContainerField; ""file///Volumes/HardDriveName/PathToFile/FileName"]

  - If [Get(LastError) <> 0

  -     Show Custom Dialog ["The file is unavailable."]

  -     Exit Script

  - Else

  -     Set Field [Table::GlobalContainerField; ""}

  -     Set Error Capture [Off]

  - End If

 

Note: Windows file syntax is: "file:///C:/PathToFile/FileName"

 

Insert from URL DOES suppress the Open File dialog box with Set Error Capture On and returns an error if it fails. The Set Field in the Else clears out the file you inserted so it doesn't take up space in your db.

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.