
I have a Sharepoint list that records petty cash transactions. I have a calculated colum (BalanceSum) which works fine as long as there is an amount in StartBalance.
Is there a way in Sharepoint or in the associated powerapp to poulate the 'StartBalance' column of the next line with the previous line's 'BalanceSum' amount?
Hi @Anonymous ,
Do you want to update all the records at the same time (update 'StartBalance' with previous line's 'BalanceSum')?
I suggest you try ForAll and Update function.
Try this formula:
ClearCollect(collection1,AddColumns(listname,"Id2",Id+1));
ForAll(collection1,Patch(listname,Lookup(listname,Id=Id2),{StartBalance:BalanceSum})
Here's a doc about how to update multiple records for your reference:
https://powerapps.microsoft.com/en-us/blog/bulk-update-using-forall-and-patch/
Best regards,