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 / Patch a choice value f...
Power Apps
Answered

Patch a choice value from one dataverse table to another dataverse table.

(0) ShareShare
ReportReport
Posted on by 11

Hello there, 

 

I have a choice field (Type) in one of my dataverse table A. The choice field has two options ( Business and Personal). I need to patch the value of this choice field(Type) to another dataverse table B. But I kept on getting an error. Here is my code: 

 

Patch (TableB, Defaults(TableB), {Type: LookUp('TableA', Name = selectededName, Type)}), 

I also tried Patch (TableB, Defaults(TableB), {Type: LookUp('TableA', Name = selectededName).Type)})

 

Here is the error message

The type of this argument "Type" doesn't match the expected type "OptionSetValue". 

 

Can someone please tell me how to properly patch in this scenario? Thank you. 

 

Categories:
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @Webpro ,

     

    Please try this:

    Patch('TestL 17S',Defaults('TestL 17S'),{Name:"ABC",Test_Choice:LookUp(Choices('TestL 17S'.Test_Choice),Text(Value)=Text(LookUp(TestL16,Name="A1").Test_Choice_2)).Value})

     

    /* TestL16 has a global choice field named 'Test_Choice_2'. 

        TestL17 has a global choice field named 'Test_Choice'. 

     

    Best Regards,

    Wearsky

  • Verified answer
    Webpro Profile Picture
    11 on at

    Hi Wearsky, 

     

    I figured out why mine doesn't work. It was because I had two local choice columns. Based on your help, I changed the column to global choices. It then worked. 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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard