Newbies Reilly Posted July 31, 2002 Newbies Posted July 31, 2002 I've been searching the forums and haven't found an answer to my question, so if it
trevorg Posted July 31, 2002 Posted July 31, 2002 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 Reilly Posted July 31, 2002 Author Newbies Posted July 31, 2002 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
Kurt Knippel Posted July 31, 2002 Posted July 31, 2002 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
trevorg Posted July 31, 2002 Posted July 31, 2002 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.
Newbies Reilly Posted August 1, 2002 Author Newbies Posted August 1, 2002 Thanks everybody for your help. I've solved my problem now.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now