Running Total in Repeating Panel

Hi,
If I understand your last post, I should not have a client side datagrid with a list of all clients constantly loaded. Instead it would be better to just have some sort of client side search function where I enter search criterea for the client I am interested in and then just load the data for that one client?

Regarding the running totals, you can see in the database table that the running total calculation is working great, thank you, but I would also like to know if I can do a running total for each client. I think I need to store these client specific running totals in the table because I would like to be able to produce a (maybe yearly) statement for each client and the opening balance (running total) would be the closing balance (running total) from the previous year.

I hope that makes sense and thank you in advance.

Regards,
Paul

########## - ADD NEW TRANSACTION - ##########
@anvil.server.callable
def new_transaction(date, inv_no, client, credit, debit, balance, running_total):
    rt = []
    for row in app_tables.transactions.search():
      amount = row['balance']
      if amount!=0:
        rt.append(amount)
      
    
    app_tables.transactions.add_row(
    date=date, 
    inv_no=inv_no, 
    client=client, 
    credit=int(credit), 
    debit=int(debit), 
    balance=credit-debit,
    running_total= sum(rt) +credit -debit
    )