Jump to content
Salesforce and other SMB Solutions are coming soon. ×

FMP Automatically Open a Specific Database


FredP
 Share

Recommended Posts

Is there a way to make the FMP application automatically open a remote database on a server? It is a real pain to load FMP, then select Remote, then select the server, then select the database, and then ontop of that have to enter your password everytime....

 

I would love it if we could reduce the number of annoying steps there....

 

Also, is it possible to not require passwords for users?

 

Thanks

Fred

Link to comment
Share on other sites

a) Create a new blank FileMaker database file. Don't bother making any field definitions, you won't need them.

 

b) Go to File Menu, Define, File References. Click "New".

 

c) Click "Add File". When the "Open File" dialog comes up, click "Remote..." yes, I know this is what you're trying to avoid, but you're only going to have to do it this once, trust me on this

 

d) Navigate to the file, select the file that is to be opened, click 'OK' or 'Open', whatever it is that the button says.

 

e) In the blank where it says "File Reference Name", type the name of the file. Leave off the file extension.

 

f) Click "OK", and "OK again, which should get you out of File References land.

 

g) Open ScriptMaker. Create a New script, "Open Solution". Use this script:

 

Set Error Capture [On]

Open File [

If [PatternCount(Databasenames, "YourFileName")=0

..Show Custom Dialog ["Unable to open the solution at this time. The server may be down or the IT guy may have tripped over the router again. Call 555-1212 if you have any questions." "OK" button only.]

End If

Close [current file]

 

h) Exit out of the ScriptMaker. Go to File Menu, File Options. Set the option for the script you just created to automatically run whenever this file is opened.

 

i) Email copies of this file to all users.

 

 

 

Now, as for passwords... my strong advice is "deal with it", unless you want all of your users to have the exact same privileges and the exact same ACCOUNT within the solution. If that's actually the case, just open File Options for the solution file itself and set the file to automatically open using the specified ACCOUNT. Then it should not ask you for username and password. If you want to bring up the dialog after you've done that (to log in with a FULL ACCESS account and password, for example), hold down the Option key on Mac, SHIFT key on PC, until the dialog comes up.

Link to comment
Share on other sites

Or you could create a standard Windows shortcut with a syntax like this:

 

fmp7://10.20.30.40/MyDatabase.fp7

 

In the example above "10.20.30.40" is the IP address of the Filemaker Server and "MyDatabase.fp7" is the name of the file that you want to open.

Link to comment
Share on other sites

The syntax that you mention works from inside Filemaker but the syntax that I noted works from outside Filemaker. As a test I applied "fmet://" to a Windows shortcut but couldn't get it to work.

 

The Filemaker Knowledge Base has more information on opening hosted files.

 

http://filemaker.custhelp.com/

KB Article: 5560

 

In a couple recent releases of FileMaker Pro our friends at FMI broke its ability to open hosted files using this method. You can read about it in the article listed below. Pretty well hidden near the bottom of the page is a file that if run will repair the Windows Registry.

 

KB Article: 5949

Link to comment
Share on other sites

  • 1 year later...

I read this post and it works great, except I can't get it to use the Guest accout to login, it still presents the user name, password dialog.

 

this is my shortcut

 

fmp7://guest@172.xx.x.x/afe_mb.fp7

 

Please advise

 

We are using FM Pro and Server 9

 

Thanks

Chris

Link to comment
Share on other sites

  • 2 months later...
a) Create a new blank FileMaker database file. Don't bother making any field definitions, you won't need them.

 

b) Go to File Menu, Define, File References. Click "New".

 

c) Click "Add File". When the "Open File" dialog comes up, click "Remote..." yes, I know this is what you're trying to avoid, but you're only going to have to do it this once, trust me on this

 

d) Navigate to the file, select the file that is to be opened, click 'OK' or 'Open', whatever it is that the button says.

 

e) In the blank where it says "File Reference Name", type the name of the file. Leave off the file extension.

 

f) Click "OK", and "OK again, which should get you out of File References land.

 

g) Open ScriptMaker. Create a New script, "Open Solution". Use this script:

 

Set Error Capture [On]

Open File [

If [PatternCount(Databasenames, "YourFileName")=0

..Show Custom Dialog ["Unable to open the solution at this time. The server may be down or the IT guy may have tripped over the router again. Call 555-1212 if you have any questions." "OK" button only.]

End If

Close [current file]

 

h) Exit out of the ScriptMaker. Go to File Menu, File Options. Set the option for the script you just created to automatically run whenever this file is opened.

 

i) Email copies of this file to all users.

 

 

 

Now, as for passwords... my strong advice is "deal with it", unless you want all of your users to have the exact same privileges and the exact same ACCOUNT within the solution. If that's actually the case, just open File Options for the solution file itself and set the file to automatically open using the specified ACCOUNT. Then it should not ask you for username and password. If you want to bring up the dialog after you've done that (to log in with a FULL ACCESS account and password, for example), hold down the Option key on Mac, SHIFT key on PC, until the dialog comes up.

 

I followed your instructions and it works really well. However, it does not close the new "Open Database" file after it has opened our database. What have I done wrong? I put in the "Close [current file]" in the script as requested.

Link to comment
Share on other sites

Does the file that's BEING OPENED have a startup script that perhaps, at some point, has Halt Script within it?

 

Is the Close file at the very bottom, after al other script steps including End If?

Link to comment
Share on other sites

Yes the Close file is at the very bottom.

 

It is opening a purchased filemaker database that I did not create (Streamline, http://previewstreamline.com/au/) so I have a feeling that it probably is the problem. All script for that file is locked.

 

I am guessing it is something I will have to live with but it is better than always opening the the database in the morning or forgetting to.

 

Thank you a lot for your help.

Link to comment
Share on other sites

  • 1 year later...

I've figured out a way to do this painlessly, but as mentioned above it only works for classes of users using the same account name. If this is okay for you (and in many cases it's just fine), then set up an Opener file as so:

1) Make a new database file called "Opener";

2) Create a script in the file with a single step, to open the remote file of your choice. You have to Add... a database file here, as specified above.

3) Don't add a Close File step right away. Let's test this first.

4) In Opener, go to File > Manage > Accounts and Privileges... Create a [Full Access] account with the same account name and password as your target remote file. Example: in the remote file, I have a "data entry" account with a "D3ath3at3r" password. So I make exactly this same combination in the Opener file. (Note: this may work with a less than [Full Access] account, but I wasn't taking any chances.)

5) In File > File Options, I set the account name and password to my target combination.

6) Also in File > File Options, I choose the Open File script to run when my Opener file is opened.

7) Close all open FM files and test by double-clicking your new Opener file. You should get logged into your remote file with the account name and password.

8) If everything is okay, save a copy of your Opener file (to use for later sometime), and add a Close File script step to the Opener script. When you next run the Opener, it will close itself automatically.

9) There you go!

 

--Karl

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use