Hi,
I'm trying to implement a radio Button, this radio button is filled from a static Entity.
I an see the values, but no one of then is checked by default.
How can I make one of them checked when the app is first loaded.
Thanks in advanced
Profile.NotificationId
Sharing the oml in which there is a radio button which is already at start that I have assigned at OnAfterFetch of aggregateYou can check the demo to see how it will work though below link.https://personal-qmzjggmd.outsystemscloud.com/Com/Screen6?_ts=638182024362505493RegardsKrishnanand Pathak
Can you confirm that you have assigned the correct value to the variable that is linked to the radio button?
Regards,
PZ
Yes
Hi,You have to set default value to Profile.NotificationId variableAs shown below:
I Do not understand your solution, because I'm not using local variable, I'm initializing the SMS and the Email directly from the static entity:
Profile.NotificationId is the aggregate variable which holds the Static entity Id.At on after fetch action of the aggregate assign Profile.NotificationId as shown belowProfile.NotificationId = Entities.Notification.SmsorProfile.NotificationId = Entities.Notification.Emailbased on what you want to be already selected.Because the Profile.NotificationId holds the value of radio button. If it has valueassigned it will already selected at start.
thanks a lot, it is working now, I have just one more question please.
when I save the form, the value of the radio button is going to be saved at Profile.NotificationId ? or where ?
Hello
You can assign the value to Profile.NotificationId on the after fetch event client action of your profile aggregate
You can check like
If Profile.NotificationId then = Entities.Notification.Email
Thanks
Tousif Khan
But my form is to save data into the database, that why I put Profile.NotificationId
Profile is the entity
NotificationId is the field where I save the value.
Hello,
you can bind any type of variable (add default value) with radio button group, but make sure the radio button which you want to set default true the value should be match with the variable's default value.