cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mrpowergage
Level: Powered On

Use Button for OptionSet

I have an Option Set with three options: ↗️➡️↘️ (with values 117280000, 117280001, 117280002)

 

I have a combobox on my form. Instead of using the combo box I would like to use three buttons

 

New_Entry_-_Saved__Unpublished__-_Power_Apps.png

 

How do I use the OnSelect property for each botton to set the value for the combobox (or alternativly to set the Update property for the data card?).

 

Thanks for any help

2 ACCEPTED SOLUTIONS

Accepted Solutions
Dual Super User
Dual Super User

Re: Use Button for OptionSet

Hi @mrpowergage 

 

You can set the configuration like:

1st Button: Set(SelectedOption, "Choice 1")
2nd Button: Set(SelectedOption, "Choice 2")
3rd Button: Set(SelectedOption, "Choice 3")
Instead of using the values, you need to use the physical name for the options added in the entity.


Now, the Update property of the datacard can be set to: LookUp(Choices(EntityName.ChoiceColumnName),Text(Value) = SelectedOption).Value

 

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!

View solution in original post

mrpowergage
Level: Powered On

Re: Use Button for OptionSet

@yashag2255Thanks for your help. I've got it working, in my case, this was the syntax:
 
LookUp(Choices(Assessments.'Wellbeing Trend'),Text(Value) = SelectedOption).Value
 
@v-siky-msftthanks for your help, but I got an "Incompatable type" error when I tried your solution

View solution in original post

4 REPLIES 4
Dual Super User
Dual Super User

Re: Use Button for OptionSet

Hi @mrpowergage 

 

You can set the configuration like:

1st Button: Set(SelectedOption, "Choice 1")
2nd Button: Set(SelectedOption, "Choice 2")
3rd Button: Set(SelectedOption, "Choice 3")
Instead of using the values, you need to use the physical name for the options added in the entity.


Now, the Update property of the datacard can be set to: LookUp(Choices(EntityName.ChoiceColumnName),Text(Value) = SelectedOption).Value

 

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!

View solution in original post

mrpowergage
Level: Powered On

Re: Use Button for OptionSet

thanks @yashag2255 

 

I'm slightly challenged by this line:

LookUp(Choices(EntityName.ChoiceColumnName),Text(Value) = SelectedOption).Value

 

How do I write this given the following info?

 

The EntityName is:

c9_assessment

 

The optionset field is:

pwc_wellbeingtrend

 

And just to check, the pysical names are "↗️","➡️","↘️", so I would replace "Choice 1" with "↗️" etc. Is that correct?

 

Many thanks for your help.

Highlighted
Microsoft v-siky-msft
Microsoft

Re: Use Button for OptionSet

@mrpowergage 

Do you mean the options are these arrows?

I have made a test, delete the combo box and save option value of each button to a variable, then set the Varible to Update property.

1. Delete the combo box in data card and add three buttons in it

2. Set OnSelect of  2197.png:   Set(Var, [@pwc_wellbeingtrend].'2197.png'), so are the other two.

3. Set Update property of data card: Var

The following is my test:

Snipaste_2020-01-21_11-02-41.pngSnipaste_2020-01-21_11-11-18.png

Sik

 

mrpowergage
Level: Powered On

Re: Use Button for OptionSet

@yashag2255Thanks for your help. I've got it working, in my case, this was the syntax:
 
LookUp(Choices(Assessments.'Wellbeing Trend'),Text(Value) = SelectedOption).Value
 
@v-siky-msftthanks for your help, but I got an "Incompatable type" error when I tried your solution

View solution in original post

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,728)