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