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

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
Highlighted
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 @Lorcan,

 

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
Highlighted
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 @Lorcan,

 

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 310 members 4,516 guests
Recent signins:
Please welcome our newest community members: