Recursive Function 101: cumulative totals

Question asked by BTimm on Apr 18, 2011
Latest reply on Apr 19, 2011 by BTimm

Title

Recursive Function 101: cumulative totals

Post

I'm new to recursive custom functions, but sounds like this might be best solution to this simple challenge:

I have a series of records, with RecIDs 1 through 6, each of which has a separate Total (number field). What I want to do is have a field for each that shows the cumulative totals based on the order of the RecID.

Basic calculation won't work without the recursion involved, if I have a relationship based on the PreviousRecord (recid - 1). I had thought I could stack the totals by adding total plus total of the previousrecord. I want this to be a field, not something that needs regular updating, so custom function with recursion seems like best path, but trying to get my head around the basics. Wondering if this is so basic that there is a custom function out there already or something else obvious I'm missing.