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.

Featured Replies

I'm having a problem inserting a file through script

here is what i have

set AttachmentPath to ("" & (path to documents folder) & "TEMP:")

tell application "FileMaker Pro Advanced"

set foo to (AttachmentPath & "release of information form.doc")

set cell "msgAttachments" of current record of database "artcode" to a reference to file foo

end tell

this works if I tell it to insert a JPG file but not a word doc or RTF file yet if insert file through the menu I can insert anything

The FileMaker AppleScript dictionary was updated for FileMaker 7, for tables, but that command to set a cell to a file as a reference, is the same as it was in FileMaker 6. AppleScript doesn't have access to the Insert File command.

One way to do this is to calculate the path, or set into a global field, in FileMaker syntax. Then call a FileMaker Insert File script from AppleScript:

do script FileMaker script "Insert File"

"Insert File" above is just what I named the script. If you change the name of the script the AppleScript will break. The script would first set a Variable to the FileMaker syntax file path, then Insert File.

There are several variations on just how you get the path, and how you call the script. But basically you use a FileMaker syntax path and the Insert File script step. In many scenarios you no longer need AppleScript to do this.

  • Author

Fenton,

thank you for your response.

it helped me allot... a guess FMP handles file paths in POSIX form and expects "file:" in front of the path.

here is the code that works and it only gives a reference rather than putting the file in the database.

set AttachmentPath to ("" & (path to documents folder) & "TEMP:")

tell application "FileMaker Pro Advanced"

set foo to POSIX path of (AttachmentPath & "CFW1D9.RTF")

go to layout "Attachments"

set cell "Attachment" of current record of database "artcode" to ("file:" & foo)

end tell

thanks again

MeanMike

Well, it seems I was wrong, you CAN insert a file reference with FileMaker, by using the "file:" prefix. Thanks.

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.