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 / PowerApp Canvas button...
Power Apps
Answered

PowerApp Canvas button to change an activity statuscode/statecode

(0) ShareShare
ReportReport
Posted on by

there is an Entity of Activity type and it has a statecode, statuscode and other optionset fields;

i want to make a button that onselect it'll change the status to approved/canceled .

i tried somehow to do it through "canvas code" but it says that it doesnt support optionset values

how do i connect the button to make it do it ?

through code or power automate ?

How?

Categories:
I have the same question (0)
  • Verified answer
    CU-18081211-6 Profile Picture
    9,272 Moderator on at

    Hi @mtx20190 ,

    You can refer the option set values with 'NameofOptionSet/Column (NameofTable)'.

    Here is an example where the Status column is an Managed ChoiceOptionSet. To update the value of this column in a particular row to Inactive, you can use this: 

    Patch(
     Asset_BaseObjects,
     LookUp(
     Asset_BaseObjects,
     Name = "Something"
     ),
     {Status: 'Status (Asset_BaseObjects)'.Inactive}
    )

     Hope it helps !

  • askondo Profile Picture
    Microsoft Employee on at

    @gabibalaban Thanks for always making the forums so much fun! I appreciate it.

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 333 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 86 Super User 2026 Season 1

Last 30 days Overall leaderboard