christianv Posted May 12, 2003 Posted May 12, 2003 Hi everyone! Is there someone who could send me an example of a calculation field that acts like a summary one using the SUMMARY function? I tried to use that function but my calculation field is always empty, even if I sort all records with the correct field... Thank's a lot!
Fitch Posted May 12, 2003 Posted May 12, 2003 Are you using a Summary field or a Calculation such as GetSummary (summary
christianv Posted May 12, 2003 Author Posted May 12, 2003 Hi Fitch, Yes I'm using a calculation such as GetSummary(summary field, break field) and I'm looking at it in Preview mode...
CobaltSky Posted May 12, 2003 Posted May 12, 2003 Hi christianv, There is no 'SUMMARY' function in FileMaker. The closest would be the GetSummary( ) function that Tom has referred to, or perhaps the various aggregate functions which summarise data directly - eg Sum( ), Max( ), Min( ), StDev( ) etc. If you're referring to the GetSummary function, it doesn't act like a summary field at all. Instead, its purpose is to allow you to set up a calculation to reference an existing summary field. The summarising is therefore done by the summary field and is merely brought into the calculation by the GetSummary( ) function Since Summary fields otherwise work within reports, where they can be used to generate sub-summaries when the data is sorted by a particular field, the GetSummary( ) function also provides the option to retrieve sub-summary values when the database is sorted by the appropriate field. For this purpose, summary field that hte GetSummary( ) function is to reference must be specified as the first paramenter, and the field that the database must be sorted by in order for the summary value to calculate must be specified as the second parameter. When the database is not in fact sorted by the specified 'break field' for the sub-summary, the GetSummary( ) function rightly returns null. However if the summary field is also specified as the break field, then the value of the summary across all records (as it would appear in a trailing grand summary, for instance) is returned.
christianv Posted May 12, 2003 Author Posted May 12, 2003 I found that while I was doing some tests: If my sort key is a field from the active table (the table were is my report and were I defined my calculation field whit a GetSummary), everything is fine...but if my sort key is a field from another table that is linked to the main table, my calcultation field return NULL!!! Anyone has an idea?
christianv Posted May 12, 2003 Author Posted May 12, 2003 Hi finaly found what I was looking for... For those who may face the same problem, you have to define a field that is equal to the linked field you what to use to sort instead of using it directly (cCompany, calculation = Client::Company instead of using directly Client::Company) Don't ask me why it has to be that way...the only thing I know is that it's working! Have a good day!
Recommended Posts
This topic is 7907 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 accountSign in
Already have an account? Sign in here.
Sign In Now