Show All FileMaker Records If Not Base Table

From Dwayne Wright PMP
Certified FileMaker Developer

TWITTER: dwaynewright
YOUTUBE: FileMakerThoughts

This is something I did on the fly for my InBizness 2.7 update and thought I’d do a quick reporting blog post on it. What I did was add a couple payment based reports that break the report by the payment type (Check, Cash, Credit Card, PayPal, etc ...) and then by a date range. One of the reports groups the payment totals by month / year and the other shows totals for each individual day that a payment was made.

The thing is, I have a Reports menu that is available from any other module and needed to come up with a method to handle the found set of records to report upon.

What I decided to do was branch the script via a script header that detects if you were in the payments module at the time the report was run. So if the user was in the payments module when the report is executed, use the current found set. If the user is in a different module, then show all payment records.

This way I can do a search in the payments module and run the report based upon that set of records ... or ... make sure all the records are represented if run from another module.

The secret of the show all records branch is the Get(LayoutTableName) function and the use of a header variable.

Since the report isn’t going to take very much time going to a the payment module, I use a script variable to know what module was linked to the activation of the report script. So I set a local variable named $StartingLayout to the Get(LayoutTableName) function. The Get(LayoutTableName) function will return the name of the table occurrence that is linked to the currently viewed layout in the foreground window.

Then later on I decided to show all records or not based upon the fact if my variable $StartingLayout does NOT equal PAYMENT. If it is anything but PAYMENT, I show all records.
More info about the author and FileMaker in general, contact me at

© 2008 - Dwayne Wright -

The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.