cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Radio Button OnSelect

Hello

 

How do i give each radio button a different OnSelect function. It seems I can only change the OnSelect function of the "Whole set" of radio buttons?

 

I am a beginner

 

Thank You

Lorcan

2 ACCEPTED SOLUTIONS

Accepted Solutions
Super User
Super User

Re: Radio Button OnSelect

You can use an If or Switch statement fire off different formulas based on what is selected. In the example below I am setting a variable with different values based on what is being selected.

 

Radio Buttons > OnSelect

If(Radio1.Selected.Value = "1", Set(gvTestRadio, "One"), If(Radio1.Selected.Value = "2", Set(gvTestRadio, "Two")))


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Community Support Team
Community Support Team

Re: Radio Button OnSelect

Hi @Anonymous,

 

Like @Jeff_Thorpe suggested, Radio control is recognized as one control for PowerApps. Thus you cannot define each part of Radio in the formula. But you can workaround this by identifying which value is selected in Radio control. Work with IF function, using something like:

If(Radio1.Selected.Value="1", .... , ....)

For more information about IF function, please refer to:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

 

Regards,

Mona

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

View solution in original post

2 REPLIES 2
Super User
Super User

Re: Radio Button OnSelect

You can use an If or Switch statement fire off different formulas based on what is selected. In the example below I am setting a variable with different values based on what is being selected.

 

Radio Buttons > OnSelect

If(Radio1.Selected.Value = "1", Set(gvTestRadio, "One"), If(Radio1.Selected.Value = "2", Set(gvTestRadio, "Two")))


--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

View solution in original post

Community Support Team
Community Support Team

Re: Radio Button OnSelect

Hi @Anonymous,

 

Like @Jeff_Thorpe suggested, Radio control is recognized as one control for PowerApps. Thus you cannot define each part of Radio in the formula. But you can workaround this by identifying which value is selected in Radio control. Work with IF function, using something like:

If(Radio1.Selected.Value="1", .... , ....)

For more information about IF function, please refer to:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-if

 

Regards,

Mona

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

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 301 members 6,196 guests
Please welcome our newest community members: