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 / MS Flow: Using a SP Li...
Power Automate
Answered

MS Flow: Using a SP List to update a Different SP List

(0) ShareShare
ReportReport
Posted on by 175

Hi all,

 

I have a question when it comes to updating an SP list based on changes of another SP list. 

 

I have two SP lists right now (SP List 1 & SP List 2) - I am using the "when item is created / modified" and "update item" connectors in conjunction in order to update the second list when the first list is edited (the first list is modified via PowerApps). 

 

This problem is that there is not necessarily a unique ID column for each item of the lists. Items in SP List 1 and SP List 2 are uniquely identified by way of 3 columns (Sales #, Line #, and Qty #). So if an item in SP List 1 has the same value in all 3 of these columns as SP List 2, they are the same item.

 

Is there a way to use a LookUp in Microsoft Flow in order to find the item in SP List 2 from these three columns in SP List 1? Any help would be greatly appreciated.

 

Farhan

Categories:
I have the same question (0)
  • Verified answer
    ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @farhandsome 

    A better way of approaching this might be to add an additional column to the second list to store the ID of the related item in the first list - that is the unique ID that you can use.  Populate the new column when the item is the second list is created.

    For example, if you add a column to the second list and call it List1ID your filter query in your Get items action would look like this:

    List1ID.jpg

    Please note the following:

    I referenced the ID for the first list in Dynamic properties

    There are single quotes around the ListID reference.

    Please let me know if you need additional help.

     

  • farhandsome Profile Picture
    175 on at

    Thanks for the suggestion, @ScottShearer.

     

    So the SP List 2 is also being generated by a separate PowerApps so I didn't want to mess with adding a column. However, I'm using the same logic as you. Attached is a picture here:

     

    MS Flow Status Check Error.PNG

     

    In this case, "Title", "LineNo", and "OrderQty" are filtering fine and the "get items" is working correctly. As you can see, I am trying to update the status of the item using a static string variable. However, the error comes when at the "update item" stage. See pic below:

     

    MS Flow Status Check Error 2.PNG

     

    It's giving me a "BadRequest" error along with these details:

     

    "Route did not match
    clientRequestId: 77d7389c-8a20-4580-9ad0-2383839d2ee1
    serviceRequestId: 77d7389c-8a20-4580-9ad0-2383839d2ee1"

     

    Is this something on my end at fault? I suspect there is a problem using "ID" as "current item" as I have it now. But I am not sure how to pull the unique identifier of the item of SP List 2 using my method.

     

    By the way, "Daily Build Schedule" is SP List 2. 

  • ScottShearer Profile Picture
    25,270 Most Valuable Professional on at

    @farhandsome 

    In your update item action, you need to reference the ID column from Get Items - see my screen shot below.

    UpdateID.png

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard