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 Apps / Unable to PATCH to mul...
Power Apps
Answered

Unable to PATCH to multiple Lookup columns in SharePoint

(0) ShareShare
ReportReport
Posted on by 383

Hi Power Apps Community,

I am trying to Patch one item from Power Apps to SharePoint. However, the SharePoint List which I am Patching to has 2 Lookup fields and one field which is a 'Person' type. 

I am using the following, but have been unsuccessful so far.

Patch('SPLIST',
 Defaults('SPLIST'),
 {
 Field1:Office365Users.MyProfileV2().displayName,
 'Field2': 
 {ID:ID,
 Value: dropwdown.Selected.'Title',
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
 },
 'Field3': 
 {Id:ID,
 Value: dropdown.Selected.ID,
 '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
 }
 }
 )

These are the errors I am picking up:

Data_Enthusiast_0-1604232502279.png

I would appreciate any assistance.

Thank you in advance.

Categories:
  • CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @Data_Enthusiast ,

     

    Here is your formula:

    Patch('SPLIST',
     Defaults('SPLIST'),
     {
     Field1: 
     {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
     Claims:"i:0#.f|membership|" & User().Email, 
     Department:"",
     DisplayName: User().FullName, 
     Email: User().Email, 
     JobTitle:"", 
     Picture:""
     },
     'Field2': 
     {Id:ID,
     Value: dropwdown.Selected.'Title',
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     },
     'Field3': 
     {Id:ID,
     Value: dropdown.Selected.ID,
     '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
     }
     }
     )

    Hope it  works and helps !

  • Data_Enthusiast Profile Picture
    383 on at

    Hi @gabibalaban 

    Thank you for the response.

    I tried the code provided, but receive the following error messages:

    Data_Enthusiast_0-1604234777474.png

    I tried to replace the 'ID' value with a numerical value, but still received the same error message.

  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    @Data_Enthusiast 

     

    Sorry for my rushed answer,

     

    gabibalaban_0-1604238453366.png

     

    your error came from this 2 data... you need to identify the correct Id from list where lookup column is taken the data. The two Id and Value has to be identical with the one from where lookup column is taken the data. 

     

     

  • Data_Enthusiast Profile Picture
    383 on at

    Hi @gabibalaban 

    No problem at all. Thank you! This helped me identify the issue 🙂

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 Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 258

#3
Mohsin Ali Profile Picture

Mohsin Ali 231

Last 30 days Overall leaderboard