Breaking Scripts Away from Context

FileMaker has a heritage it simply can't get away from - at least not yet. That heritage is represented by the fact that each FileMaker file used to be its own table prior to version 7. This meant having a window showing, was a guaranteed fact you were looking at a given table. When running scripts, FileMaker knew it would act upon the data of that table. Same file, same table, same data. That was a few versions back.

Enter FileMaker 7 and the ability to have multiple windows, multiple found sets and multiple instances of tables showing. FileMaker had to establish some type of method for acting on the data - they chose context. Running a script on a Customers layout, tied to a customers table, means the script will assume it should take actions based on the context - whether or not it makes sense.

So developers must now anticipate context and script accordingly. There are, however, situations where you need general routines that will function solution wide - regardless of context. This is when you need to use the methodology of "Take it with you".

In this video I'll show you a few of the complex methods I use for passing context based data into a non-context based script. It's a valuable skill that any FileMaker developer should have!