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

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

Recommended Posts

  • Newbies
Posted

Hi,

In my database I have a field that holds a filename for another FM database. This name is different between records. I'd like to run a script that takes that filename and places it into an Open[] statement to automatically open that file. My problem is that Open[] seems not take an entry other than by pointing to a filelist.

Any ideas please.

Posted

Hi Dave,

DaveC said:

My problem is that Open[] seems not take an entry other than by pointing to a filelist.

That's right, out-of-the-box, FM doesn't provide the functionality you're looking for.

However there are several ways to achieve the outcome you're looking for.

One is to use the Open URL script command and then ensure that the default browser is configured appropriately to deliver the desired effect.

Another is to use snippets of VB or AppleScript (depending on what platform you're on), embedded in a script (using the 'Send Message' or 'Perform AppleScript ' commands) to open the relevant file.

Last but not least, you could use any of several excellent third party plug-ins (eg Troi File, DialogMagic. LaunchIt etc) which provide the capability to dynamically launch a file via script. wink.gif

Posted

An old plain FileMaker way would be to construct a script with If statements. If you're dealing with a limited known group of files this will work. You say the name is in the records, but you don't say how many files. Probably too many.

If [ some field = "donuts" ]

Open [ "Donuts.fp5" ]

Else

If [ some field = "cookies" ]

Open [ "Cookies.fp5" ]

End If

End If

Posted

In the past I have used Troi File plugin for this, as well as (on the PC) doing the following:

writing a calc that had the contents of a .bat file, which included a statement to open the relevant file, then writing a script that exports that calc field to a file called x.bat, and launching it via the "send message" script step.

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