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.

how to change exported filename via apple script

Featured Replies

Hi there,

I want to cahnge my exported file's name by any text in my global field in FileMaker.

For windows version i am using dos commands (ren command) to change filename after i exported from filemaker.

It is works but now my problem is mac version how can i change exported file name? New file name should be get from filemaker field.

Apple script can help me? But i don't know Apple Script. Can anybody help me?

Thanks

Adam

It's pretty easy to do, using a Perform AppleScript step. But you'll have to try it on a Mac to test.

--tell application "FileMaker Developer"

set fixedFile to cell "FixedFile"

set fileName to cell "FileName" of current record

tell application "Finder"

set name of file fixedFile to fileName

end tell

--end tell

Explanation:

fixedFile is global or unstored calculation with the full Mac path of the Export file. What this should be depends on whether this is on a standalone computer, in which case a relative path will work, or whether it's on a networked solution, in which case you'd want to use the common Shared folder.

In either case you could alternatively use an invalid path, in which case the file will end up in the FileMaker application folder; but only if the user has permissions, which they might not.

A Mac path (for AppleScript) is the old style, with colons (spaces are OK):)

Macintosh HD:Users:Shared:Export.pdf

What fixed path method are you using on Windows?

fileName is just a simple file name, in the current record of the current FileMaker layout. It's easiest to just go to that layout first. You can also specify the layout:

set fileName to cell "FileName" of current record of layout "Rename"

-- is a commented line in AppleScript

--tell application "FileMaker Developer"

and

--end tell

lines are not needed in a Perform AppleScript step, unless nested inside another app's tell block.

FileMaker knows who it is. But they are needed, uncommented, in the Script Editor app, which is the AppleScript editor that comes with Macs.

  • Author

Thanks for your helps.

I use relative path for windows version.

------------

Adam Djuby

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.