(Editor’s Note: As some of you know I’ve been asking my colleagues to write tips and tricks content for the blog. At some point in the future we may be asking the group community at large for contributor content as well. Jerry is a 9 Certified FileMaker Developer at ITS; he also runs the 101 and Intermediate trainings here. Thanks, Jerry!
– Colin).
One thing that really gets my goat is multiple security gates. If I have already logged into my computer using a login and pw, why do I still have to use another login and password to further authenticate myself when I open my database? Worse yet, sometimes an end user will put in an account/password to get into the computer, then the SAME account/password info to log into the database.
There are a couple of ways around this. Most programmers will tell you, “Use Single Sign On authentication.” FileMaker developers will typically say, “Use an opener file and save the login and PW there.”
Both of these are fine if the situation merits or permits it. Here I present another option. In this case, the end users are not using active directory to manage Accounts. They also don’t want to use an opener file, for a number of reasons that are outside the scope of this document.
In order to solve this problem I turned to using a URL to open the FileMaker files. This technique has been around since version 7.0 but there have been some bumps in the road. For some reason, it was not cross platform until version 9. [Check this or give a reason may have worked in 8.5. FMI accidently removed it from 8.0]. While there seems to be no real convention on what this technique is called, in essence it’s basically a Hyperlink. They are very handy and can be used on web pages or as desktop shortcuts.
Just like regular hyperlinks, a FileMaker hyperlink needs to have the proper structure to be interpreted by a browser.
The syntax is ‘fmp7://ServerLocation/FilemakerFileName’
If you have a file hosted on a server you must find out the IP address of the server. You can find this out by selecting ‘Open remote’ of your database. The IP of the host computer is usually something like 192.68.2.2 and is typically assigned by the person who set up your network. Let’s say you have a server and your database is called WidgetBase. To open it you need a URL that looks like this;
fmp7://192.68.2.2/WidgetBase.fp7
Before we use this lets make sure it works. Type in the URL corresponding to your file into your browser and click enter. Doing this will open up FileMaker and then open your file. Next open up your browser again and paste the URL back in. But before you hit the ‘enter’ key, single click on the icon the left of the URL you just pasted in and drag the icon onto the desktop.
This will create a shortcut file on your desktop.
Check your shortcut by double clicking on it and seeing if the solution opens up. You may need to fix the shortcut. Right click on it and select ‘Properties’ and paste the URL into the URL address field.
After determining that the Hyperlink shortcut works, put it in the Startup folder (PC) or Accounts - Login Items (Mac) to automatically open file when you login to your computer.
At the beginning of this essay, I mentioned having to re-authenticate yourself. Here is the technique for managing that. You can pass the account and password info along with the URL of the database file in the URL file.
The syntax is ‘fmp7://Account:Password@ServerLocation/FilemakerFileName’
For our WidgetBase example we could have an account called JSmith using a password Pa55word. In this case, the URL will be
fmp7://JSmith:Pa55word@192.68.2.2/WidgetBase.fp7
Using this locator as the URL will allow you to pass the users account info to the solution. Putting this shortcut in the Startup items folder (or the Login items folder on a Mac) will allow the database to be opened after the user logs into their computer.
WARNING:
Since the account information is stored as plain text, treat this solution with care. It is not good for all situations. If the computer is used by other people or if not secured by having the user authenticate themselves, this is not a good solution. But used with caution, it is a simple way for end users to log into databases effectively.
One last interesting application for a Hyperlink would be on your company’s intranet home page. If your company has a standard internal home page, then placing a link to your database would be an easy way for end users to consistently log into the database (of course you would not want to embed a password in this hyperlink.
In summary, using this technique you can place a shortcut on your computer that will open your FileMaker database with your stored account and password. The technique is easy and will save you time.


0 Responses to “Tips and Tricks: Open a FileMaker database using a Hyperlink”