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

use the value from a field in a scriptstep


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

Recommended Posts

Posted

Am trying to use the filepath of a file stored in a field (Not the POSIX Path) to open the file using applescript.

I have the following script steps

Set Variable [$FilePath; Value: DocumentLibrary::File Path]

How can I use this variable $FilePath in a "Perform Applescript" Script step?

Posted

You just need to massage the path into an applescript and use the variable's value as text for the calculated script, not the dafault option, but the one above!

Substitute( and Replace( comes in pretty handy here!

--sd

Posted

If the code were

tell app "Finder"

open $filepath

end tell

How should I have "Stringified" the above script.

In otherwords how do I add the return keys at the end of each line. Use the inverted P character?

Posted (edited)

Just use the carriage return symbol, ¶ (Option-7 on Mac), just like any other FileMaker calculation.

"tell app "Finder"¶open ("" & $FilePath &"") as alias¶end tell"

Edited by Guest

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