cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EMohaisen
Helper I
Helper I

Change a choice field value when clicking on a button

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!

 

 

5 REPLIES 5
yashag2255
Dual Super User II
Dual Super User II

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!

Hi @yashag2255 

 

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

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

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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!

Thank you all, I will try and get back to you!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (70,790)