Safer Global Variables
Over the years, I've met a wide range of developers. Just like the variety of clothing styles you'll see at any popular concert, there are potentially just as many different programming styles. The usefulness, however, of development standards is equivalent to the simplicity of a stoplight. If we can all agree on one thing, then that one thing can benefit everyone who uses it.
When you consider this statement in light of FileMaker's available Global Variables, it's hard to agree on the decision of whether to use them or not. Maybe you like using a global variable temporarily across scripts — even though some might consider that approach problematic. Maybe you avoid using Global Variables because a trusted source once told you never to use them. Or perhaps you're one of those tidy developers who just can't stand the sight of them within the Data Viewer.
Whatever your stance, there are definitely times when using a Global Variable is beneficial. The scope of a variable is a concept familiar to pretty much every programming language. A globally scoped variable is valuable only as long as you can trust it. In this video, I present a method for using FileMaker's Global Variables that provides an extremely high degree of confidence in their use. We create a system where the variable is modified in one place only, making for a solution which is much easier to modify and maintain.
- Read more about Safer Global Variables
- 2 comments
- Log in or register to post comments
Universal UI Strings
Claris/FileMaker, as a development environment, is full of all kinds of hidden corners and secret places. Most of this is due to its age and keeping a strong commitment to backwards compatibility. To its credit, there are very few features which have been removed to date. Still have a database which uses repeating fields to store data? They're still there!
To say that developing within the environment is straight forward is a bit misleading. Sometimes, you can combine knowledge about older features with newer ones and end up with something entirely new and cool. That's what happens in this video and technique file. By using JSON with one of those somewhat hidden features, we can solve an age old problem of having field specific information available to the whole solution - and we only need to manage it within one location, which happens to be specific to the field itself. It's one situation where having tightly coupled data is exactly what you're looking for!
In this video we'll take a look at how a well structured format like JSON can benefit us in a wide variety of ways. By addressing the need for supporting multi-lingual field labels, we are just touching the tip of the iceberg with this creative solution.
- Read more about Universal UI Strings
- 2 comments
- Log in or register to post comments
Leveraging Layout Variables
Within the world of FileMaker development, there are always those golden gems which become the hallmarks of "how to do something" - despite there often being more than one way to solve a problem. For managing lists of data, prior to the existence of the While function, the go-to custom function is CustomList. When it comes to variable output display using a portal you'll almost always reference Virtual List as the commonly understood approach.
When it comes to saving user state, there's always been a number of ways accomplish this. But, for my part, I'm going to declare Layout Variables as the way to solve many issues when it comes to saving user state in FileMaker.
While the term "Layout Variables" can apply to either locally scoped variables or global ones used within the layout, the concept is such that you're using variables to store things for the specific layout the user is on. When it comes to saving state, whether for the specific session or in order to persist, there has to be a simple and easy way to store, reference and retrieve these values and I think that solution is finally here. In this video, I showcase the Custom Functions and methods I use to implement Layout Variables.
If your FileMaker solution has a need to maintain state and make it easy to both store and restore global variables used for the user interface, then you simply must watch this video.
- Read more about Leveraging Layout Variables
- 8 comments
- Log in or register to post comments
Solution Wide Popover Menus
Having access to one of the more recent and most prevalent UI patterns within FileMaker is extremely empowering. Using Popovers and portals, it's now possible to create solution wide menu systems which can be used for navigation, actions or whatever you see fit.
When you combine global variables, with the Virtual List technique and popovers, you can significantly decrease the amount of time it would normally take to maintain even a moderately complex menu system within a FileMaker solution.
It only takes a bit of creativity and foresight to implement solution wide popover menus which can be easily changed. These menus can all leverage the same elements and dynamically change based on any number of variables.
In this video, I walk you through the components which make up this powerful technique and reveal a number of powerful core methods for making it happen. Whatever level you're at, there's something to be gained by watching this video tutorial about popover menus.
- Read more about Solution Wide Popover Menus
- Log in or register to post comments