AnsweredAssumed Answered

Summing the value of a field

Question asked by Pafin on Dec 16, 2008
Latest reply on Dec 16, 2008 by Pafin


Summing the value of a field


Hello !

I've have a database of orders with many fields in FM 8.5 :

  • customerID (001, 002, 003, 004, ...)
  • number of order (F2008.0001, F2008.0002, ...)
  • amount ($45, $65, $38, ...)


Each customer can have many orders (if they're happy with the products ;-) ); each order is a new record.


I've to do the sum of the amounts for each customer.

It's possible to do it creating a field called GlobalAmount (statistic, SUM of amount, not progressive);

than, I've created a field CustomerSum (calculation, RECAPITULATIV (GlobalAmount; customerID). but this works only if the records are sorted by customerID, wich is not always possible when you ask for the CustomerGlobalAmount in an other table of the database !

How can I do it better ?


Thank You !