Radio Button query

Radio Button query

  

hi,

How can I store information in an aggregate when a radio button is clicked.

Thanks

Hi Ankita,


You store information on Database tables (or local storage if you're working with Mobile), aggregates are used to fetch information.

Anyway, you should link the "On Change" event to a screen action and then you can perform database operations or others.


Hope it helped.

João Marques wrote:

Hi Ankita,


You store information on Database tables (or local storage if you're working with Mobile), aggregates are used to fetch information.

Anyway, you should link the "On Change" event to a screen action and then you can perform database operations or others.


Hope it helped.

Hi João Marques,

Thanks for the reply.

But I have a scenario in which I have Questions entity and i made the structure of that entity and added one boolean attribute in that structure and I created one more entity named as Response having attributes Res(boolean) , QuestionId, PassengerId(from passenger entity).

In one webscreen i have multiple question (Fetched from Question entity) and in front i have 2 radio buttons (YES and NO) In properties of that radio button I am confused that what should I write in Variable and value property and In OnChange Action what should I do so that data can be saved in Response entity.

Please help me with this because I am new to outsystems.


Thanks

Hi Ankita,


In the extended properties of the radio, the variable will hold the value for both radio widgets, in your case the "Res" attribute. In this case, the value for the radio correspondent to Yes will be True and to No will be False.

You can then set the OnChange for each case and do that operation, like the example below:



Below follows an example of the OnChange, where I bound the new value to the Boolean variable and in the example refresh the widget (in your case, do the operation with the boolean variable).



Hope it helps.

Solution

Hi Ankita,

I would do something like what I attached.

Regards,

Marcelo

Solution

Hi Ankita,

You can simply set the current iteration value of aggregate by setting OnChange of your RadioButton.

Something like below you can use for your specific logic.
GetEmployeeDetails.List.Current.Gender = RadioButtonValue

Regards,
Palak

Marcelo Ferreira wrote:

Hi Ankita,

I would do something like what I attached.

Regards,

Marcelo

Thankyou Oml really helped. It worked