2 Replies Latest reply on Mar 4, 2014 3:25 AM by Kaps_1

    Total of values in a field in a portal (not using a Report)



      Total of values in a field in a portal (not using a Report)


           Hi there


           I have a slight conundrum..


           I am creating multiple different layouts using the same fields. Lets say the fields are called "2013" and "2014".


           In another field ("Item") I have a number of different values. Let say 5 records of A ("A1"; "A2"; "A3"; "A4"; "A5").

           For B, there's 5 records ("B1" etc)

           For C, there's 5 records ("C1" etc)


           I have on three different layouts, a portal on each, and I have filtered that the first portal would pick up only 5 out of the 15 records that begin with A

           The next one does that same, but with B

           Next with C


           To total all values in the 2013 and 2014 fields, I am using a "Totals 2013" and "Totals 2014" field for each.

           I want it to total only the records showing for that letter. Let's say all the A's = 4 each. But the B's = 5 each. C's = 6 each


           I want the "Totals 2013" and "Totals 2014" to show the total of all A's = 20

           In the next layout, I want "Totals 2013" and "Totals 2014" to show the total of all the B's = 25 etc


           I don't want to do a Report, as I don't know how to get alternative shading of fields as you do in portals, and I want to filter within the portal, so I don't have to add a lot of stuff to the scripts. I know it is recommended you use Reports rather than portals, but I want to use portals, as it would mean major reformatting of a lot of stuff.


           Surely there must be a way. If I make the "Totals_2013" field a calc (Sum), it doesn't seem to add up only those I show in the portal. If I use it as a Summary field, it summarises one set of figures, but not the other.

           It worked when I used a Report style, but it wasn't the portal style. I want to do this in the portal instead.


           I basically want the two Total fields to only see what I have in front of it, even though all values pass through it.


           What could I do?