cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mezcalbean
Advocate II
Advocate II

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,898)