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 / Solved: patching to Sh...
Power Apps
Unanswered

Solved: patching to SharePoint choice and lookup type columns

(6) ShareShare
ReportReport
Posted on by 6,949

The following should work if you disallow multiple selections for the column in SharePoint.

 

Any updates will be in this newer post.

 

I will start with choice type columns, but the approach is exactly the same for lookups.

 

Let's say your SharePoint list (MyList) has a choice column (MyChoiceColumn) with 3 choices: Choice A, Choice B, Choice C.

 

This works:

Patch(MyList, MyRecord, {MyChoiceColumn: {Id: 1, Value: "Choice A", '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}})

 

In order to make it practical, have a dropdown control (Dropdown1) in PowerApps with the following Items property:

Table({Id: 1, Value: "Choice A"}, {Id: 2, Value: "Choice B"}, {Id: 3, Value: "Choice C"})

 

Then you can modify the above Patch to this:

Patch(MyList, MyRecord, {MyChoiceColumn: {Id: Dropdown1.Selected.Id, Value: Dropdown1.Selected.Value, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}})

 

If you have a lookup to MyLookupList with MyLookupColumn, then set the Items property of the dropdown control to this:

MyLookupList

(you must have also added this list as a data source first)

 

Then the Patch will be this:

Patch(MyList, MyItem, {MyLookupColumn: {Id: Dropdown1.Selected.ID, Value: Dropdown1.Selected.Title, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}})

Please let me know if anyone has any issues with making this work.

Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    What is "MyRecord" in this solution?

  • Meneghino Profile Picture
    6,949 on at

    MyRecord is a record or record type variable which identifies the record to be modified.

    It need only contain those columns in the primary key of your data source.

    Please let me know if further clarifications are needed.

  • madimad Profile Picture
    4 on at

    iam trying i have choice column but its giving me error on record . tried alot 

  • seadude Profile Picture
    1,855 on at

    Hi @Meneghino. How does this method apply when Patching multiple records to a Sharepoint Person-type column? I can't seem to get this part to work.

    Example:

    • Sharepoint data source
    • Using a Person-type column for one Form field
      • This column allows me to lookup people within my org AND select multiple.
    • I just can't figure out how to write the Patch statement for this. "Odata" is a bit baffling to me. I need to research more.

    Thank you

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard