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.

Saving to desktop / relative file path?

Featured Replies

I host a FM database online that several people in my company access from different locations. I recently built a series of scripts that pull a list, sort it, and save it to my desktop.

When my co-workers try to run these scripts, they get an error message because FM is pointing the document to save on *my* desktop.

Is there some way to save to a relative filepath (like filemac:Desktop/filename.xls), so that no matter who runs the script, the file will be saved to the desktop of the computer they are using?

Use the Get ( DesktopPath ) function. Set a script Variable, $filepath

"filemac:" & Get ( DesktopPath ) & file name.ext

If some are on Windows, use a calc for the prefix;

Case ( Abs ( Get ( SystemPlatform )) = 1; "filemac:"; "filewin:" ) & Get ( DesktopPath ) & file name.ext

  • Author

tried it, doesn't work. i also tried variations...

"filemac:/" & Get ( DesktopPath ) & "/CEC1.xls"

filemac:/ & Get (DesktopPath) & "/CEC1.xls"

filemac: & Get ( DesktopPath ) & /CEC1.xls

thanks for the help, by the way. mighty kind.

"doesn't work" is not a good description. What does your calculation return?

Try removing the slash before filename. Get ( DesktopPath ) already has a slash at the end, so that would be at least one problem.

Yes, that's what usually gets you, the fact that the Get (*path) functions already have the beginning and ending slashes.

It always helps to create a calculation field or use Data Viewer to look at file paths.

... you know whats better than this:

Case ( Abs ( Get ( SystemPlatform )) = 1; "filemac:"; "filewin:" ) & Get ( DesktopPath ) & file name.ext

??

"file:" & Get(DesktopPath) & "filename.ext"

Anyway, yeah I always have to construct my filepaths in the dataviewer cause frankly i forget what Get(DesktopPath) returns.

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.