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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

updating a SharePoint lookup field

(0) ShareShare
ReportReport
Posted on by 216
So I want to update a lookup field 'interface' which is multi-select.
My flow takes an Excel file and checks each row to see if it needs to update the SharePoint item or create a new one.
 
The file has the interfaces listed but not the IDs. I realised that I'd need these IDs from the SP list I'm looking up to. 
So I added actions which basically used a Filter array, Select and append to string variable to get these into an array of all the IDs.
 
My inputs for Update Item look like this for interfaces on one of the items:
"{\"ID\":1264},{\"ID\":1265},{\"ID\":1266},{\"ID\":1267},"
 
However, my outputs are empty for this column. What could I be doing wrong?
Categories:
  • Verified answer
    Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at
    The expected format would be:
    [
    {"ID":1264},
    {"ID":1265},
    {"ID":1266},
    {"ID":1267}
    ]
     
    You could use a slice to remove the last comma. After that you can use a replace to remove the '\' characters. And finally you can use a concat and json to turn it into a valid array.
     
    Below is an example
     
    json(concat('[', slice(replace(variables('StringArray'), '\', ''), 0, -1), ']'))
     



    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • CAlvy Profile Picture
    216 on at
    Thanks so much @Expiscornovus - that did the job.
    I didn't need the slice or replace as my inputs no longer had the \ or final comma, but I used the json and concat with the [ ].
  • Expiscornovus Profile Picture
    33,997 Most Valuable Professional on at
    Great to hear this worked for you @CAlvy 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233 Super User 2026 Season 2

#2
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 178

Last 30 days Overall leaderboard