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.

mount external volume during open remote

Featured Replies

i'd like to have the external volumes that refrenced files are stored on open and mount when a user opens the database remotely.

About the only way I could think of doing something like this would be to put an applescript on each person's machine that mounts the volume with the necessary privileges. When the file opens a startup script calls the applescript to mount the volume.

I've never tried this, and my applescript skills are ~0, but it might just work.

It is actually pretty easy to write. It seems to work, at least most of the time :-] Put the following in a Perform AppleScript step in the FileMaker file, and run it as a File Options startup script. Obviously put your own machine's IP. This is for a Mac server. I believe 'smb:' works for Windows servers. I've commented out the 2nd one; you can remove comment marks.

--To force an Authentication dialog:

set sfiles to "afp://192.168.0.100"

--To bypass the dialog, put the real username and password in:

--set sfiles to "afp://username:[email protected]/Macintosh HD"

try

mount volume sfiles

end try

-- To do the opposite (maybe on closing)

tell application "Finder" to eject disks

I find that it is not very reliable the first time it runs when it's a startup script with Open Remote. It kind of needs to get slapped upside the head. It seems to work much better if you run it twice.

set sfiles to "afp://username:[email protected]/Macintosh HD"

try

mount volume sfiles

end try

delay 1

try

mount volume sfiles

end try

  • Author

But scripts are specific to the database they are on right? So if you are going through the steps

Click on filemaker< press cancel when new databse screen opens< go to file< open remote< click on desired server< click on desired databse

the modified open remote script doesn't work.

or am I doing something wrong?

The statement "scripts are specific to the database they are in" is kind of vague. Yes, they are. But when you choose the "Print" command, does it print to a printer attached to the Server, or does it print to the one attached to your client computer? How about Export?

Almost all of these types of steps actually run from the client machine, in the environment of the client machine, its files, etc.. AppleScript is similar. So, if there is an AppleScript in a FileMaker Perform AppleScript step on a remote file, and the script it's in is specified as the script to run at startup, then that script is going to run when you first Open Remote that FileMaker file. The AppleScript is going to run from your client machine, and, in this case, is going to try and mount a volume on the client machine.

It works for me. But as I said, it's a little dodgy, and seems to need to run twice before it really does it.

Edited by Guest

  • Author

so what you're telling me is that I need to store the apple script on the server machine that hosts the database?

see when I modified the open remote script I was unable to actually modify that specific script, I had to create a new open remote script and add the apple script step. When running the open remote it did not mount the external drives until apple 1 was pressed so I was a bit confused.

I moved the apple script to the host machine, but the process still does not run properly unless you have already gone through the file< open remote< server< database and then press apple K

Edited by Guest

I said: "Put the following in a Perform AppleScript step in the FileMaker file, and run it as a File Options startup script."

So I don't know why you'd be "moving" or "storing" the "AppleScript" anywhere else. The "AppleScript" does not exists as a file. It's in the FileMaker file, which is hosted. You use Open Remote to open it. OS file sharing is off on the FileMaker Server machine (I may have been using FileMaker Pro to host, but it should be the same thing).

  • Author

Hahaha I'm sorry I wasn't thinking about what I was saying yesterday. the one step I missed was the setting the file options.

It works perfectly! thanks oodles!!!

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.