My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
   
SUBSCRIPTION STATUS
If you are a subscriber to this publication, sign-in to access locked articles. To subscribe or renew go to www.AdvisorStore.com.
Go to Article
Advanced Search 

ADVISOR TIPS

Total a Value by Page in FileMaker Pro

Here's how to create a summary field that summarize the records just from the current page in the footer.

By John Mark Osborne, Database Pros president and owner, and FileMaker Advisor technical editor


A FileMaker enthusiast at the 2008 FileMaker Developer Conference asked me if it's possible to create a summary field in the footer part that would summarize the records just from the current page. I immediately asked him if he was using sliding objects on the layout. If there is the same number of records on every page, there are several easy approaches. Unfortunately, he answered "yes," and I was about to begin a quest that lasted a week after the conference was over.

My next thought was, this would be fairly easy with a script but would require modifying multiple records, which could cause record-locking in a multi-user environment. No, I needed a calculation that would change depending on the page that was displaying in preview mode or outputting from a printer. So, I racked my head for several hours, starting with simple approaches like a subsummary sorted by a calculation field containing the following formula:


Get(PageNumber)

I figured I could use a trailing subsummary part instead of a footer, but get the same results since the subsummary part would break at the end of each page. Unfortunately, the Get(PageNumber) function evaluates as each page is being previewed or printed. It took me a while to figure this out, and I was only able to once I employed the Data Viewer. Using the GetNthRecord function, I looked at the page number calculation field on pages other than the current page. To my dismay, the calculation always showed the current page number no matter what page it was on.

I attempted many more simple yet obscure approaches to solve the problem but none of them worked. I was getting frustrated enough to ask for help so I talked to a few developers. Most hadn't tried to total a value by page, and the ones who had tried had employed a script.

What do YOU think about this topic? Share your advice and thoughts using this form.

Your Name

REQUIRED : PUBLIC

Your E-Mail

REQUIRED : PRIVATE

Job, Company

OPTIONAL : PUBLIC

City, State, Country

OPTIONAL : PUBLIC

Your Web Site

OPTIONAL : PUBLIC

Your Comment

Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

John OsborneTechnical editor John Mark Osborne is president and owner of Database Pros, offering FileMaker resources on the Internet. He is author of Scriptology, a speaker at FileMaker Developer Conferences and Macworld conferences, and a trainer for the Professional Training series created by FileMaker, Inc. http://www.databasepros.com jmo@filemakerpros.com

Printer-friendly
page layout

Keyword Tags: FileMaker, FileMaker Development, FileMaker FileMaker Pro

ADVISORAMA
History will be kind to me for I intend to write it.
-- Winston Churchill, British politician

ARTICLE INFO

FileMaker.Advisor.com

Web Edition: 2008 Week 42, Doc #19543

Print Edition: October/November 2008

FREE ACCESS FREE ACCESS

Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
Portions copyright ©1983-2008 Advisor Media, Inc. All Rights Reserved.
Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, Inc. in the United States and/or other countries.
Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
Hosted by Prominic.NET Website powered by
LOTUS SOFTWARE
osboj041-02 posted 10/13/2008 modified 06/29/2009 03:11:44 AM ztfmfd/ztfmfd
domino-144.advisor.com my.advisor.com 07/02/2009 04:46:00 PM