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 / Library and sister SP ...
Power Automate
Answered

Library and sister SP List - Check if item exists, retrieve ID for item update

(0) ShareShare
ReportReport
Posted on by 10

I'm struggling with this - I have a Document Library with some custom columns, one being a unique identifier (not the ID column)

 

I want to check a separate List to see if that unique identifier exists (same column name in both places) and if it does, give me the ID of that list item so that I can use 'update item' next...

 

and if it doesn't exist, use 'create item' with the thought that future updates to that newly created item would match the identifier already in the library and use 'update item' for subsequent changes.

 

I have gone through about 30 articles now and I don't know how to *extract the list ID for that item* if there is a match, so I can update it with information from the library's columns (mirrored.)


Please let me know if you need further information, thanks!

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

    @EasternSeaboard 

    To check the SharePoint list, use a Get items action with a filter query that will limit the rows you get back to those that meet your criteria.  Here is a link for more info on creating filter queries.

    To find out if any rows are returned, use the length() expression.  If length() is greater than zero, you had a match

    image.png

  • EasternSeaboard Profile Picture
    10 on at

    Thanks - that is what I've done, however I need to then update the specific row returned, if it exists. How do I get its ID? I need more than true or false returned, or rather if true is returned, I need to know what the list item ID is.

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

    @EasternSeaboard 

    The ID of the item is available to you from Dynamic properties under Get items.

    You'll loop through the item(s) returned from Get items and have an update item action inside the loop that referenced the ID.  The Loop will be on one side of your condition.

    image.png

  • EasternSeaboard Profile Picture
    10 on at

    Seems like that's all I was missing (aside from the length expression) - will try it out. Thanks!

  • EasternSeaboard Profile Picture
    10 on at

    So I didn't have the filter query setup correctly (including the column name and 'eq') and had some issues as some columns were not populated, but now with data in them all and the filter query fixed, this is working. Thanks again!

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard