Running balance using RGs cell index

Anyone know how to leverage a RGs cell index to present a running balance? Something like this:

Date Amt Run Bal
12/31 5 18
12/30 3 13
12/29 10 10

Figured it out. Here it is in case anyone is interested. I put this formula in a text box in the RG row,

RG “Name” List of “data type” :Items from# Current Cells index’s Amount:sum.

Kind of easy now that its done but took me some time to figure out.

2 Likes

Yep, you got it!

This is a tricky scenario and your solution works. However, and I learned this the hard way :man_facepalming:, be aware that it only works for what’s displayed in the RG. It’s not a true running total of transactions.

If you filter the RG the totals will change. Depending on your use case that can be ok or not. Just wanted to point it out.

RG’s are just display elements for lists. There’s no magic to repeating groups. Just as an image element displays an image, an RG visualizes a list. Don’t confuse the presentation of a thing with the thing, right? The OP figured out the correct answer, which involves understanding the list-wise operations that Bubble affords us.

That was exactly my point that an RG is simply a display element. Therefore if the list it is displaying is filtered, calculations based on the content of the RG will be affected.

The OP’s mention of a running balance was the only reason I pointed it out as often you want a running balance that is accurate independent of the list content being displayed.

This topic was automatically closed after 70 days. New replies are no longer allowed.