A READER ASKS: First Value Of A FileMaker Break Field Dilemma

From Dwayne Wright PMP
Certified FileMaker Developer

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

Please Note: If you are viewing this page in a news feeder, the images may get munged up a bit or other formatting of the posting may fail. For the best experience, please visit the journal directly by clicking (here).

A READER ASKS
I have a report that in preview mode is 20 pages, which has a page break on a sort field, let’s say “Agent”.  My intention is to email each page out separately to each agent.
 
I have a script that loops through the pages, saving each page as a pdf…that part works successfully.  What doesn’t work, and what I need help with is determining what the value of the break field is on each page.  Whenever I try using commands in my script like copy, or get, it only grabs the very first value of the break field.
 
Any ideas?


-------
DWAYNE RESPONDS
I’ve read through this a couple time and I’m not sure I’m following you completely. If you are wanting to capture the combination of unique break field values that occur at the page breaks, I’d probably look at getting that data from a looping subscript.

Using a variation of a technique that has been around for more than a decade (posting available here), you could capture all the unique occurrences of the break field in a global field or script variable.

BACK STORY ON BREAK FIELDS?
The term breakfield is normally attached to a reporting operation on FileMaker data. In the printed report arena, the break field can be the dependent “sort by” field used in the subsummary layout part for a report that summaries data by a grouping.

In the calculation arena, the GetSummary function will give you the information in a summary field for a found set of records when sorted by a break field. The syntax of the GetSummary function is ...  GetSummary ( summaryField ; breakField ).

Unlike printed reports that have a subsummary part, the GetSummary function is not dependent on a layout part and can be used within other calculations. The function has the two parameters of summaryfield and breakfield. The summary field parameter obviously refers to the summary field you want to capture the data from.

The breakfield is the field that must be sorted to obtain the sub summary total in a grouped value report for the summary field. 

© 2011 - Dwayne Wright - dwaynewright.com

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.