cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

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
Highlighted
Community Support
Community Support

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
Highlighted
Community Support
Community Support

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
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,118)