Skip to main content
Question

Running Total

  • March 15, 2022
  • 0 replies
  • 152 views

Forum|alt.badge.img+7

I can't seem to find a solution anywhere so here is my question:
I have 4 fields. A, B, C, D 
D is a formula field that totals A, B, &C. 
I want to be able to adjust A, B or C and have the new total for D to reflect the changes in addition to what the total was previously. 
Any thoughts?



------------------------------
Steven Pearson
------------------------------
This topic has been closed for replies.

You can use something like this:

var number A = SumValues(GetRecords("{3.LTE." & [Record ID#] & "}"), fidA);
var number B = SumValues(GetRecords("{3.LTE." & [Record ID#] & "}"), fidB);
var number C = SumValues(GetRecords("{3.LTE." & [Record ID#] & "}"), fidC);

$A + $B +$C​


Replace fidA, fidB, and fidC with the field ID for your Fields A, B, and C.

One Caveat with this approach, if the table is large or has several inter app relationships, using three formula queries in one field could degrade performance.
------------------------------
Paul Peterson
------------------------------