cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mezcalbean
Helper III
Helper III

Using Buttons as choices instead of drop downs

Hi 

 

I have a calculator as an example, using SharePoint as the base I have a choice of say male and female. Instead of a dropdown I would like a button one being male and the other being female. How can one use buttons instead of drop downs?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @mezcalbean ,

Put them both in the Data Card and delete the Drop-own. Set a Variable on each OnSelect

UpdateContext({varGender: "Male"})

and Female for the other one. The Update for the Card would be (if writing back to a Choice field)

{Value:varGender}

or a Text field

varGender

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @mezcalbean ,

Put them both in the Data Card and delete the Drop-own. Set a Variable on each OnSelect

UpdateContext({varGender: "Male"})

and Female for the other one. The Update for the Card would be (if writing back to a Choice field)

{Value:varGender}

or a Text field

varGender

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

Hi @WarrenBelz 

thank you for the quick reply

Apologies for not completely understanding your reply.

 

I have updated the data card but there is an error 

 {A312469C-5EDA-41B3-8EEF-1699BE754977}.png.jpg

 

I have added two other screen shot one of the card and the SharePoint name

 

BIP_2022-01-11_13-16-08.pngSnip & Sketch_2022-01-11_13-14-14.png

 

Thank you for your help

 

Regards

@mezcalbean ,

That is just the error box - you can either delete it (as well as the star) or set the Y to Parent.Height - 5

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

 

@WarrenBelz Thank you

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (2,587)