cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
rwittels
Resolver I
Resolver I

Disable Radio OnSelect

Hi. I am going nuts trying to get this working. I have a Radio button control. When the user selects a value I want the Radio to disable so that their first choice is the only choice they can make. My Radio OnSelect code looks like this:

 

Q1_Radio.DisplayMode.Disabled;
If(Q1_Radio.Selected.Value = "Correct Answer",Set(Score, 100),Set(Score, 0))

 

The score works fine. It just doesn't disable the radio buttons. What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
rubin_boer
Super User
Super User

hi @rwittels instead of Q1_Radio... Assign the status to a variable and set the radio display mode to the variable

UpdateContext({rbMode:DisplayMode.Disabled}) and set the display mode of the radio button to rbMode

rubin_boer_0-1613940427790.png

 

hope it helps

 

View solution in original post

3 REPLIES 3
rubin_boer
Super User
Super User

hi @rwittels instead of Q1_Radio... Assign the status to a variable and set the radio display mode to the variable

UpdateContext({rbMode:DisplayMode.Disabled}) and set the display mode of the radio button to rbMode

rubin_boer_0-1613940427790.png

 

hope it helps

 

View solution in original post

rwittels
Resolver I
Resolver I

I removed

Q1_Radio.DisplayMode.Disabled;

from the OnSelect Property and placed this code in the DisplayMode Property and it works but now my score doesn't work:

If(!IsBlank(Q1_Radio.Selected.Value),DisplayMode.Disabled,DisplayMode.Edit)

Any idea why my OnSelect doesn't work now? Is it disabling before getting the score?

Thank you. Works perfectly.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

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