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

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

Recommended Posts

Posted

Open what type of file? Another FileMaker File? Or a different type of file? e.g. PDF, Excel, Word, etc... based on the filename?

If it's a FileMaker file, just use the "Open" command, and you can check if it's open or not use the Design Function, "DatabaseNames" to determine this.

  • Newbies
Posted

I'd like to open a FM database. The name of that database is stored in a calculated field which joins chunks of text and numbers from other fields (e.g. in2002ov01, in2001m02 and so on).

Now I have a button in a layout which tab changes for each record depending on the calculated field. Would it be possible to have a script that opened the file that appears on the tab (which could be different from record to record)?

I hope I've explained myself better this time.

TIA

Posted

A SIMPLE script example:

If [DatabaseName = "Client.fp5"]

Open [Client.fp5]

End If

If [DatabaseName = "Account.fp5"]

Open [Account.fp5]

End If

If [DatabaseName = "Order.fp5"]

Open [Order.fp5]

End If

Posted

Sound like you will need a script with a series of IF statements to determine which file to open.

If[TabName = in2002ov01]

Open [in2002ov01.fp5]

Exit Script

End If

If[TabName = in2001m02]

Open [in2001m02.fp5]

Exit Script

End If

Etc.., Etc..

Thank goodness you can highlight script steps and duplicate them all at once now. I would put the "most commonly" accessed files at the top. Then the script will come across those first and then exit. (Instead of having to go through the entire script to get to the bottom to open the file)

Hope that's what you were looking for.

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