web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Finding and updating a...
Power Automate
Answered

Finding and updating a single item in a Sharepoint List

(0) ShareShare
ReportReport
Posted on by 195

Dear Community,

 

I am writing a flow to count the total number of items in a SharePoint list.  For example, the total number of entries for a particular location.  After the total, I want to update a second SharePoint list item with the total for each location.

 

I can easily count and total in 2 separate variables.  My challenge is finding the record in the 2nd SP list and updating it with the specific value.

 

I've looked at: https://powerusers.microsoft.com/t5/Building-Flows/How-to-update-an-item-in-a-SharePoint-list-base-on-the-changes/td-p/100880 to no avail.

 

How do I find a specific record in a SharePoint list and update it?

  1. Get items (from location list)
  2. Filter array (from location list)?
  3. Update item (from location list) but how do I get the "ID" of the location?

Thanks, Jason

Categories:
I have the same question (1)
  • rsaikrishna Profile Picture
    3,703 on at

    @wiredupjax ,

    Get Items action has following parameters:

    a. Filter Query: You can insert any filtering requirements here.

    b. Order By: You can sort the filtered items as well. 

     

    Can you try above without using Filter Array?

     

    Let me know how it works for you.

  • wiredupjax Profile Picture
    195 on at

    The filter for the 1 item worked.. it selected the 1 record and i was able to count and save.

     

    Next question--how do i update the 2nd location? Do I do another get items with the filter?

     

     
  • rsaikrishna Profile Picture
    3,703 on at

    @wiredupjax 

     

    Can you explain about 2nd location means?

     

    Do you mean another list? If so, you use Get Items with filter condition. After that, you try Update Item action to update it.

     

    Regards

    Krishna

     

    ------------------------------------------------------

    If my replies helped you, please mark it as Accepted Solution with ThumbsUp.

     

  • Verified answer
    v-alzhan-msft Profile Picture
    on at

    Hi @wiredupjax ,

     

    I have made a test on my side to create a List 1 and List 2 as below:

    2.png3.png

    The location column in the two lists with single line of text type, the count field in the List 2 with number type.

    And multiple items in the List 1 would has only one corresponding item in the List2.

    And then you could refer to screenshot below to create the flow:

    1.png

    The length expression in the count field as below:

    length(body('Get_items_2')?['value'])

     

    Best Regards,

    Alice

     

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

  • wiredupjax Profile Picture
    195 on at

    Perfect! This is much more elegant than my approach with counters/incrementors. 

    Thank you @v-alzhan-msft 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard