Jump to content
Sign in to follow this  
Reilly

Opening files

Recommended Posts

I've been searching the forums and haven't found an answer to my question, so if it

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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