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 / Change a choice field ...
Power Apps
Unanswered

Change a choice field value when clicking on a button

(0) ShareShare
ReportReport
Posted on by 68

Hi All,

 

I have a drop down field (type=Choice), i want to have abutton so when i click on it, it will chane the value of this choice field, example from "Pending" to "In Porgress", i tried create a variable and set it as a default to the Choice field but it seems this works only with fields type=Text. 

 

please find attached screenshot for more info, any ideas please?

 

thanks!

 

 

2019-08-03_22-18-52.jpg
Categories:
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @EMohaisen 

     

    You can modify the "Update" property of your DataCard as:
    If(!IsBlank(Var_HMT),{Value:Var_HMT},DataCardValue27.Selected)
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • EdMoh Profile Picture
    68 on at

    Hi @yashag2255 

     

    Thanks for the reply, but actually it's giving me an error (attached)

    2019-08-04_13-30-52.jpg
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @EMohaisen ,

    Could you show me how do you set Var_HMT?
    Is this choice field single choice?

    I've made a similar test but not met the error that you showed.

    Here's my test: (my choice field is single choice)

    1)Set the button's OnSelect:

    Set(Var_HMT,"In Porgress")

    2)Set the drop down's Items:
    Choices(listname.columnname)

    Set the drop down's Default to empty

    Set the data crad's Update:

    If(!IsBlank(Var_HMT),{Value:Var_HMT},DataCardValue27.Selected)

     

    Then if I cilck the button, the choice's field will update with the "In Porgress" value.

     

    Best regards,

    Community Support Team _ Phoebe Liu

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @EMohaisen 

     

    Based on the previous screenshot that you have shared, you are setting up this variable on the Submit button itself. Please make sure you are using correct attributes/controls name in the formula. Are you getting this error on the Update Property? Can you share a screenshot of the part where exactly you are getting this error? Please share the specifics there might be some type mismatch around this expression because based on a similar test that I carried out on my end, this updates the choice field successfully.
     
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • EdMoh Profile Picture
    68 on at

    Thank you all, I will try and get back to 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 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard