23
Views
3
Comments
Solved
How to show confirmation when changing Radiobutton value?
Question
Application Type
Reactive

I have a radiobutton with Option 1 and Option 2. 

When I want to change option, for example, I initially selected Option 1, then if I select Option 2, I want to show a popup saying 'Do you want to change your option to Option 2?' with button Yes and No.

If I click Yes, it will change to Option 2, if I click No, it will retain the current value of Option 1.

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello

On a on change action of your radio button you can check whether the current selected value = previous selected value, if it is equal then nothing happen if it is not equal then we will open a pop up.
And if the user click on the yes then we will assign current value to previous selected value.
And wise versa.

I am also attaching a sample for that can help you with this.

https://personal-ejuytnht.outsystemscloud.com/TestApp/RadioButton_Sample?_ts=638531531352955660

Thanks
Tousif Khan

TestApp_RadioBtn.oml
UserImage.jpg
ars art

This would work, thanks! but I hope Outsystems could make a built-in option to make confirmation (custom popups) for widgets (when changing radiobuttons, clicking buttons, etc.) so we don't have to worry about assigning/reverting variables.

2026-01-20 16-37-33
José Teixeira
Champion

Hello,

You have to define your "On Change" logic for the radio button.

In the On Change action you should have an assign changing the Popup display controller.

Inside the popup you have to set the assign's for the correct variable on the logic for the "Yes" button.


I hope that made sense.

If you have a OML template and are free to share, I'll be glad to show you how I envision it.

Best regards,

José Teixeira

2023-10-21 19-42-11
Tousif Khan
Champion
Solution

Hello

On a on change action of your radio button you can check whether the current selected value = previous selected value, if it is equal then nothing happen if it is not equal then we will open a pop up.
And if the user click on the yes then we will assign current value to previous selected value.
And wise versa.

I am also attaching a sample for that can help you with this.

https://personal-ejuytnht.outsystemscloud.com/TestApp/RadioButton_Sample?_ts=638531531352955660

Thanks
Tousif Khan

TestApp_RadioBtn.oml
UserImage.jpg
ars art

This would work, thanks! but I hope Outsystems could make a built-in option to make confirmation (custom popups) for widgets (when changing radiobuttons, clicking buttons, etc.) so we don't have to worry about assigning/reverting variables.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.