web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Bug with Radio control...
Power Apps
Unanswered

Bug with Radio control or I missed something

(0) ShareShare
ReportReport
Posted on by 8

In an application that has over 100 questions, I use radio controls to collect answers from users. Each question has one radio control with a maximum of three options, one text input control for entering comments and one circle that changes color depending on the options the user chooses (Option 1 - Green, Option 2 - yellow, option 3 - red, and bay options the circle is gray).

 

To be able to change the colors of the circle depending on the option selected by the user via the radio button, I use a variable of type Record in which I enter the selected option each time something changes on the OnChange.

I also have a button for reset all radio controls.

scenario:
1. I open one question - a radio control appears without the selected option
2. I choose the option - the color changes, more precisely, the code is triggered in the onchange property
3. I click on the button that resets the radio button (everything returns to the default value), nothing selected.
4.1 I click on the same option as the previous one - NOTHING HAPPENS ... the OnChange does not fire.
4.2 I click on another option, everything works normally, the OnChange is triggered

 

????!!!! 

 

code in OnChage:

 

Set(g_01_Quotations, Patch(g_01_Quotations, {
 an01Q_1_1: rdb11_Answers_scrQuestions.Selected.Result,
 tl01Q_1_1:If(Trim(LookUp(c_QuestionCatalogForSelectedBA, SegmentName_QC = lbl01_QuotationsTitle_scrQuestions.Text && QuestionCode_QC = lbl11_Code_scrQuestions.Text).YellowOption_QC) = Trim(rdb11_Answers_scrQuestions.Selected.Result ), "Yellow", Trim(LookUp(c_QuestionCatalogForSelectedBA, SegmentName_QC = lbl01_QuotationsTitle_scrQuestions.Text && QuestionCode_QC = lbl11_Code_scrQuestions.Text).RedOption_QC) = Trim(rdb11_Answers_scrQuestions.Selected.Result), "Red", "Green"),
 no01Q_1_1: txt11_Notes_scrQuestions.Text
 })
)

 

 

and... when I put a same code from OnChange to OnSelect everythig works... But what happend with Reset and OnChange.

 

Thanl you all

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at

    Hi @Gidrone ,

     

    This is a known issue.

     

    Best Regards,

    Wearsky

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at

    Hi @Gidrone ,

     

    There is a work around.

    You could try my steps:

    1\ Add a radio control 'Radio1' and set its onchange property to:

    Set(A,A+1)

     

    Set 'Radio1' 's Onselect property to:

    If(Thevar=Radio1.Selected.Value,Set(A,A+1));Set(Thevar,0)

     

    2\ Add a button control to reset the radio control.

    Set the button 's  Onselect property to:

    Set(Thevar,Radio1.Selected.Value);Reset(Radio1)

     

    Best Regards,

    Wearsky

  • Gidrone Profile Picture
    8 on at

    Hi @v-xiaochen-msft 

     

    Thankk you. Do you know when MS will fix this issue?

  • v-xiaochen-msft Profile Picture
    on at

    Hi @Gidrone ,

     

    To be honest, I don’t know if this is an expected behavior.

    Or maybe it is not a bug, it is designed like this I guess...

    Of course, you could submit your idea to Microsoft. Here

     

    Best Regards,

    Wearsky

  • Gidrone Profile Picture
    8 on at

    Hi @v-xiaochen-msft ,

     

    What is an expected behavior??? When you reset control, mean back to default, and select a same option, don't fire OnChange!!! If is this by design, that mean bad design.... I can't imagine this kind of design... and this is Bug not new idea... please fix it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard