cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KevinHardy
Level: Powered On

Sharepoint/Powerapps calculations

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Sharepoint/Powerapps calculations

Hi @KevinHardy ,

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support Team
Community Support Team

Re: Sharepoint/Powerapps calculations

Hi @KevinHardy ,

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,915)