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
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

Highlighted
Community Support
Community Support

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
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

Highlighted
Community Support
Community Support

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

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