Test A FileMaker Calculation By Creating An Example File / Data Viewer

From Dwayne Wright PMP, PMI-ACP, CSM
Certified FileMaker Developer

WEB: www.dwaynewright.com
EMAIL: info@dwaynewright.com
TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

Previous to the Data Viewer feature in FileMaker Advanced, many times, I would create a temporary FileMaker file to test out a complex calculation. This technique gives a developer the ability to create fields they normally wouldn’t create in a production file. These fields can be used to troubleshoot the calculation under a number of conditions. After the testing process is complete, you can then implement the calculation into your production FileMaker solution.

I still do that sometimes, but more often I use the Data Viewer in FileMaker Advanced. On the most basic level, the Data Viewer will show you data within fields, variables or defined calculations as you work with FileMaker Advanced. Particularly useful when used in tandem with the Script Debugger,another feature available only with FileMaker Advanced under its Tools menu.

The Watch tab can be used to define what fields, calculations and variables you specifically want to keep track of. Setting up an expression to watch (fields, calculations and variables), is done via the add expression button found in the lower right area of the Data Viewer. This will bring up your traditional define calculation dialog box with a couple twists. These twists include an area to see the defined result of the expression and a button to refresh the valued results (called Evaluate Now).

Using this method, you can quickly add a calculation into the data viewer to see what its result will be. If everything looks good, you can add that calculation to your production database. If it looks off, you can tweak it right there in the Data Viewer until it fits the bill.

Here you can see the Watch tab selected in the data viewer and I’m watching a calculation I created using the Get(CurrentTimeStamp) function. You can see the calculation/expression and its result.

More info about the author and FileMaker in general, contact me at info@dwaynewright.com.

© 2010 - Dwayne Wright - dwaynewright.com