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.

Output file name based on field?

Featured Replies

I would like to be able to set a script to export to a file name based on a particular field (username using the get function). Is this possible?

Yep. Create the full path & file name in a variable and use the variable in the "specify output file" window of the export script step.

Only the variable should be listed there, no calculation.

Note though:

- the path must exist already, FM can't create a folder

- the path syntax has to follow the FM path syntax rules, not the OS's syntax. Syntax is different for Mac and Windows so you may need to branch your code according to the platform.

  • Author

Yep. Create the full path & file name in a variable and use the variable in the "specify output file" window of the export script step.

Only the variable should be listed there, no calculation.

Note though:

- the path must exist already, FM can't create a folder

- the path syntax has to follow the FM path syntax rules, not the OS's syntax. Syntax is different for Mac and Windows so you may need to branch your code according to the platform.

Thanks. So do I simply create a field to calculate the path and just type the field into the "specify output file" window of the export script step?

  • Author

I got part of this working. I was able to get FileMaker to export the file to the correct location using a variable to define a path as described above by Wim Decorte.

However, in a subsequent step in my script, I'm using an AppleScript to then open the file using SimpleText under Classic (we have a specific need for this versus it opening in TextEdit). How can I specify the same variable in AppleScript? Just adding the variable to it doesn't work.

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.