Jump to content
Server Maintenance This Week. ×

Defining a getSummary function


This topic is 4852 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I've looked at supplied at standard FileMaker script was when all of this started provided by BruceR

I've looked at the template files and their scripts

I've searched onto the web on that specific topic and I've tried many time and cannot figure it out.

I have the a CustomerOrder table and want to get counts by grouping information together, For example, I have the following table:

CustomerOrder

InvoiceNo, IndexNo, OrderNo, Status

123456 1 0101 Photographed

123456 1 0102 Photographed

123456 1 2012 Ordered

123456 2 0301 Photographed

123456 2 0405 Ordered

123456 2 0512 Ordered

123456 2 0701 Ordered

123455 1 0104 Photographed

123455 1 0201 Photographed

123455 1 2501 Ordered

The result I am looking is as follow

InvoiceNo, IndexNo, Status, Count(*)

123456 1 Photographed 2

123456 1 Ordered 1

123456 2 Photographed 1

123456 2 Ordered 3

123455 1 Photographed 2

123455 1 ordered 1

I am looking a the GetSummary ( summaryField ; breakField ) function and I am totally lost.

In my mind I have two summaryField (InvoiceNo and IndexNo) and the breakField is Status

GetSummary ( CustomerOrder::InvoiceNo & CustomerOrder::IndexNo ; CustomerOrder::Status )

When clicking OK in the calculation dialog box I get the following error message "Only summary fields are allowed as the first argument in a GetSummary function".

What I want to get is summarized counts of status grouped by InvoiceNo and IndexNo.

Where could I find a good practical example on how to do this?

Best regards!

Daniel

Link to comment
Share on other sites

What I want to get is summarized counts of status grouped by InvoiceNo and IndexNo.

A calculation field is not necessary for this. Define a summary field as Count of [any field that cannot be empty]. Create a new list layout of the table, with a sub-summary part by Status, and no body part. Sort your records by InvoiceNo, IndexNo and Status.

BTW, your example result is incorrect.

Link to comment
Share on other sites

This topic is 4852 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.