0

Summing record

I am tring to create summing column base on another column.

Let's say Column A will have numerical vaules, now Column B will have sum of previous record from Column B plus current record of Culomn A.

I created a logic in Python, but when i try to coded in formula, i get Circular Reference error.

Thanks,

 

Logic Example:

list_a = [1,5,2,8,10,5]

list_b = []

a = 0

for i in list_a:
    a = a + i
    list_b.append(a)

1 reply

null
    • Sean
    • 5 yrs ago
    • Reported - view

    You can use something like this in a Trigger or a Button...

     

    let tId := number(this.Id);
    let tA := this.A;
    B := last((select YourTableName where number(Id) < tId).B) + tA

     

    This will update 1 record at a time. You can use a loop to modify multiple records.