Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

How can I get from the Calculation function the value found in DestinationFolder ?

tell application "Finder"

set DestinationFolder to (path to home folder as text)

end tell

Thanks!

Well I found that I can use something like Get (DesktopPath). I will see what else I can do with my calculation function. I had the idea to remove the word "Desktop". However, this will not work on a French OS.

Posted

I kind of wonder why you'd need this. As you've shown above, you can get the path easily with AppleScript; and you'd usually use such a Mac path via AppleScript; where you can easily get it (circular logic).

But, for calculation fun, this is a FileMaker to produce exactly the same text. A bit of a PITA, because you need to remove the first "/" in the entire path, then remove "/Desktop/" (which I guess you could just hardcode, but where's the fun in that).

Let ( [

DT_orig = Get (DesktopPath);

len = Length (DT_orig);

DT = Right (DT_orig; len - 1);

pos = Position ( DT; "/"; len; -2);

fm = Left ( DT; pos -1)

];

Substitute ( fm; "/"; ":")

)

Posted

Thank you very much Fenton.

I am trying to do most of my function using FileMaker Calculation.

The reason I've needed this functionality is because the working folder I've created for my solution are under MacIntosh HD/User/Username/SubFolder1/SubFolder2.

I needed a way to quickly retrieve the MacIntosh HD/User/Username path. I have a field which, using the calculation you've provided me with to populate the image reference. Using this function I can now add the proper path.

It is now working, thanks again!

Daniel

This topic is 5109 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.