Level: Intermediate, Version: FM 8.5 or later


One of my favorite FileMaker functions is GetSummary; I use it frequently, and it had never occurred to me that there might be any alternative. Recently, however, Mikhail Edoshin pointed out on the FMPExperts list that GetLayoutObjectAttribute can serve as a viable replacement, like so:


I threw together a demo file, ForgetSummary, to compare the performance of GetSummary vs. GetLayoutObjectAttribute…

7-28-2013 3-21-24 PM

…and was pleasantly surprised to discover no significant difference between the two methods, either locally, or on a WAN. Note: if you want to test this on a WAN, start with a small number of order records in your found set. You don’t want to wait for 21K records to sort on a WAN. Also make sure to close and reopen the demo file between tests, to rule out caching… otherwise one method will appear to be significantly faster than the other.

If the resulting report (or under-the-hood scripting) looks familiar…

7-28-2013 3-29-16 PM

…you may recognize it from when we examined Fast Summaries a couple years ago.

Given that the two methods perform about the same, is there any reason to prefer one over the other? As usual with these articles, I learned something in the process of creating and debugging the demo, and also clarified my thinking during the writing process. Since the report is based on summarized order data, grouped by vendor, and since GetSummary requires that the “break field” live in the active table (i.e., orders), I had convinced myself that it was necessary to create a FileMaker 6-style “pipeline” calc to get the vendor name into the order table.

But that actually isn’t true at all… as long as your vendor names (and of course vendor primary keys) are unique, if you want to use GetSummary you can do a two-level sort like so…

7-28-2013 4-04-18 PM

…and then use order::id_vendor as the GetSummary break field. So no need to create a pipeline calc after all. And no need to make any layout-level schema changes either. The script pretty much takes care of everything.

Meanwhile, if you want to use the GetLayoutObjectAttribute method, you will need to a) assign one or more object names, and b) have a layout somewhere with a sub-summary part, as per this example from our demo:

7-28-2013 4-14-55 PM

It will be interesting to see what clever uses people come up with for this technique.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.