FileMaker Favorites Launcher

Through the years, the concept of favorites has become a standard in most software user interfaces. File browsers, media players, and web browsers all implement some form of favorites in one way or another. As a developer, it’s easy for me to overlook this concept in any application or framework, but in FileMaker, the use of favorites has never really been my favorite.

FileMaker (now Claris) introduced the idea of favorites back in version 11. While the feature was simple, it added a slight benefit over saving aliases or creating login files for multiple solutions. Between FM11 and FM18, the favorites user interface  changed with the times, but it’s functionality never really hit that sweet spot between functionality and ease-of-use, at least for me.

So, we set out to create a “FileMaker Favorites” file that could be more functional for users who tend to access multiple solutions on a regular basis. One that was both easy to use, easy to manage, and could be used between multiple versions of FileMaker, even passed between machines or operating systems, without losing it’s settings like window size/location and sort order. The end result turned out to be a solid replacement for the FileMaker Launch Center favorites. We’ll get into the nitty gritty next, but feel free to skip ahead and download the end result.

FileMaker, by default, will retain the window size and location for each file, but those locations are saved in plist files(macOS) or registry keys (Windows) specific to each version of FileMaker. Our FM_Favorites file will retain the window size and locations regardless of FM versions or operating system. The same goes for the sort order. For FM_Favorites, we implemented the Button Bar Sort module developed by Xandon Frogget, so it was easy to retain the last-used sort order each time the FM_Favorites file is closed.

With the introduction of variable external data sources in FileMaker 16, we now have the ability to define a file path before connecting to a FileMaker file, but there’s one caveat. According to the FileMaker help page:

Variables are supported in FileMaker data source references. Set the variable before anything that uses the reference is accessed. Once the reference has been resolved, it will not change if the variable is changed.

Basically, this means that once a data source is defined and FileMaker is connected to the file, FileMaker cannot update the data source. The only way to update the data source is to close the file, re-open it, then redefine the data source variable.

In order to get around this hurdle, we’re using a Helper file to close and re-open the the main file each time a new data source needs to be redefined. The Helper file is stored in the main file, in a container field, in the Preferences table, then gets exported into a temp directory during the startup. The FM_Favorites file retains the helper file’s location by storing it’s path in a text field, and the Helper file retains the location of the main file. When a new favorites variable needs to be defined, the Favorites file calls a script in the Helper file to manage creating and resolving the new data source. The scripting used to manage this process isn’t overly complicated, but it did require some careful planning in order to account for triggers used to retain settings like window size and location, sort order, and the path to the Helper file. The Helper script closes the Favorites file, reopens the Favorites file, then calls the script to define the new data source variable. The Favorites file can then close the Helper file and open the database file via the “refreshed” data source variable. Once the data source is open, FileMaker considers it resolved, so this process is repeated each time a new data source variable is defined.

One thing to note when using the FM_Favorites file is in how FileMaker handles “recents”. Any database opened via the “Open File” script step file does not get saved into the FileMaker recent list.

We’ve enjoyed using this little tool so much, it’s become part of our everyday workflow, so we included it as a free download in this blog post. Feel free to download the FM_Favorites file and we hope you can enjoy it as much as we have.

Now, if only Claris could bring back the “Show this screen when FileMaker Pro opens” in the Launch Center, but I digress.

1 thought on “FileMaker Favorites Launcher”

Leave a Reply

Your email address will not be published. Required fields are marked *