Breaking up into groups

Discussion created by deleted-user-yA_w_FC9FKe5 on Mar 11, 2014
Latest reply on Mar 12, 2014 by JGBarclay
I have a bunch of Divisions (DIVISIONNA) and I would like to create a function that will total all of them up and give a quick summary. 

The divisions can be any combination of a 100 different divisions.

North = 5
Sourth  = 10
SA = 3
FL = 12

Not sure if this is important but the divisions are string values.  Currently this is what I have and it just list them

        function sumTransactions(features) {
          var transTotal = 0;
          for (var x = 0; x < features.length; x++) {
            transTotal = transTotal + features[x].attributes["DIVISIONNA"];
          return transTotal;

I'm using the selectinbuffer function to gather my features and then this function to do some totals.