Sum the reciprocal isn't the method to use for a related table.
If you were willing to produce this list on a layout based on Prints, rather than images, there's a simple summary report format that can give you one row of data for each size with a subtotal counting the number of prints in that size. Performing a find could limit that report to those for a single image or you can pull up records for multiple or all images and group your sub totals under a sub heading for each image record.
To display this data on an Images based layout would use one of two methods. Do you have FileMaker 12 or newer? If so, we can use ExecuteSQL to produce this list. If you do not, there's a way to use an intermediary table that has just one record for each print size and a global field that "reaches through" in order to match to only the print records for the current image and then also by size to produce subtotals for each print size, but only for the current image.
Thank you PhilModJunk. We are using Filemaker 11, and Filemaker 10.
The intermediary table sounds like a good solution, but the problem is that Print Size can be almost anything. Some prints are odd sizes, some are fractions of an inch off from the standard sizes...etc.
Having the list appear on the Images layout is pretty key, as we would like to see at a glance what we have, as most of the other information is also presented on that page.
The intermediary table works like this:
Images::__pkImageID = Sizes::_fkImageID
Sizes::Size = Prints::Size AND
Sizes::_fkImageID = Prints::_fkImageID
Then a count calculation defined in Sizes can count all related records in Prints. A portal to Sizes can then list the sizes and number of prints in that size for the given image record.
The trick is to use the specified size in Prints and the _fkImageID field in Prints to create a new record in Sizes if one for that combination of size and image ID does not already exist. If you enabled "allow creation of records via this relationship" for Sizes in the Sizes to Images relationship, this script step would create a new Sizes record, but only if that related record did not already exist:
Set Field [Sizes::Size ; Prints::Size ]
Clever workaround, for sure, but I was hoping it would be simpler.