Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6009 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Is it possible to have a button in FM9 to open the Finder? I have a client file system and the client's files from iWork, PDF's etc. are there. It would be nice to have a button in a layout that would open the particular client's folder in the Finder. Possible?

Posted

You will probably have to use AppleScript and use FileMaker to create the filepath.

Posted

As Martha says, use one of the FileMaker functions to determine the user's OS name (different for everyone). These would be:

Get ( DocumentsPath )

Get ( DesktopPath )

The AppleScript would look something like this:


tell application "Finder"

	open folder "Macintosh HD:Users:fej:Desktop:Registrations xml:"

	activate

end tell

The "activate" is to bring the Finder to the front, so you can see the folder. The folder path could be produced by writing the above as a calculation, in the Perform AppleScript step. In which case you need to escape the quotes, and explicitly add the paragraph returns (AppleScript is a line-based). If the folder is the ClientName, within the Documents folder, the calculation would look like:

Let ( [

docs = Get (DocumentsPath);

docs_Mac = Right ( Substitute ( docs; "/"; ":"); Length (docs) - 1)

];

"tell application "Finder"¶

open folder "" & docs_Mac & ClientName & ":"¶

activate¶

end tell"

)

  • 3 weeks later...
Posted

You're welcome. You might want to search for recent posts, for one of my posts that told how to create the folder (when needed) from a FileMaker field.

This topic is 6009 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.