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 / Update Lookup columns ...
Power Automate
Answered

Update Lookup columns in a SharePoint Library

(0) ShareShare
ReportReport
Posted on by 49

I have a project where I am moving Thousands of documents from over 4,000 Document Libraries to 15 Document Libraries.
That project is working, where I am capturing metadata from the "old" libraries, and storing it in columns in the new Libraries.
In the screen shot below "Pre" equals "Previous" value from old library:

shanemeisnerdhg_6-1643813142082.png

 

What I now need to do is update two Lookup columns in the library with that information:

shanemeisnerdhg_1-1643812025583.png

 

It would be GREAT, if I could just "Stamp" the Value from "PreClientName" into the ClientName column, but that would be too easy  😐

 

I did try using a "Get Items" step, and filter on the Client ID, which does get the Item and the data( Using a different Document here in a test library):

shanemeisnerdhg_3-1643812230455.pngshanemeisnerdhg_4-1643812272465.png

But I'm getting lost on how to update the data in the Lookup column(s).
Using Update file properties to set the "ClientName ID" field to ClientName from the Get Items step doesn't work..

shanemeisnerdhg_0-1643814260917.png

 

I get an error ( where XXXXXX is the Correct Client Name): 
"code": 502,
"message": "BadGateway",
"message": "Error converting value \"XXXXXX\" to type 'System.Int64'. Path 'Id', line 2, position 26.\r\nclientRequestId: 766c89d1-cfcd-4393-bb8b-ec0bd107905b\r\nserviceRequestId: 766c89d1-cfcd-4393-bb8b-ec0bd107905b"

Categories:
I have the same question (0)
  • Verified answer
    shanemeisnerdhg Profile Picture
    49 on at

    Not sure how it works, but it worked by making a couple changes.

    I changed Identifier to ID from File Properties:

    shanemeisnerdhg_1-1643888934867.png

     

    And changed ClientName Id to "ID" from Get Items:

    shanemeisnerdhg_2-1643888994327.png

     

    This added the ClientName to the ClientName column.
    The ClientName:ClientId column gets set by the name in that column so it updated that column as well:

    shanemeisnerdhg_3-1643889226513.png


    Not sure I understand how it knows that "ID" = Client Name, but it works so we move on .. 😉

     

     

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @shanemeisnerdhg,

    Thanks for your sharing.

  • Ameen1989 Profile Picture
    82 on at

    I am facing a similar issue updating the lookup fields. When I enter the ID, instead of fetching the exact value for the similar entry, it fetches and the last entry in the Apply to each

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard