Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Sum All Rows from an SP List and add that Value to another SP List with the same Identifier

(0) ShareShare
ReportReport
Posted on by 629

I have an SP List that has hours logged against it and they reference an identifier. This identifier in another SP list needs to have the total number of hours from all Items in the first SP list.

 

jamescosten_0-1708524458566.png

So if all 3 items above all had the same WTRFNumber "WTRF46", then the number of hours I would like added to the other SP list is 15. So on the other list I would have WTRF46 and 15.

 

Any idea how to complete this? And I would need it to only update items that have a WTRF number, those that do not Ignore.

 

  • ACDBT Profile Picture
    22 on at
    Re: Sum All Rows from an SP List and add that Value to another SP List with the same Identifier

    Here's my best guess, main thing is using the Filter Query parameter from the Get Items in Sharepoint List connector.  Some compose functions should help with the common pitfalls of types not quite matching up.

    Loosely you want to:
    0. initialize a variable <total_hours> with the type Number
    1. loop over all of the unique WTRFNumbers in your 'totals' sharepoint list (you may need to use the compose function to get the WTRFNumber as a string, instead of as a whole item)
    2. use that to filter the sharepoint list of items and only get the ones that match the WTRFNumber you want (in filter query type something like [WTRFNumber eq <WTRF from totals list>])
    3. then you could loop over these filtered items, and add the 'hours' value to your <total_hours> variable (you may need to use a compose function to get the hours number.)
    4. copy out the value of the totals variable to your Totals sharepoint list, then set it to 0 before you go into the next loop

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492