Page 1 of 1

Get value of Radio Button in List

Posted: Thu Jun 21, 2018 7:31 pm
by hoangtrungcs
Hello Everybody

In LANSA WAM

I want to get selected value of radio button in display List in Screen.
I can set value for radio button in Wam but can not get value when button clicked or load page.

Please support me !
Thank you so much!

Re: Get value of Radio Button in List

Posted: Tue Jun 26, 2018 1:07 pm
by hoangtrungcs
For more details
In this case I use radio button not radio group control.
Then I add this radio to List but I can not get value of radio button was selected when reload page.

Re: Get value of Radio Button in List

Posted: Wed Jun 27, 2018 10:07 am
by AbelS
Hi

Drop the radio button weblet over a input list column (for example std_code). Make sure you set a code value ("code" property in weblet details). See screenshot

For example, if you use column std_code and nominate "CHK" as the code property, when you post the list, std_code will have "CHK" for that row.
Use radio button.jpg
Use radio button.jpg (49.17 KiB) Viewed 1217 times
Remember that for the value to be posted, the column must be input capable, not just text output.

Re: Get value of Radio Button in List

Posted: Wed Jun 27, 2018 3:58 pm
by hoangtrungcs
Hi AbelS

Thank you so much for your support!
The value of radio button in list can be get after reload. So happy!

But after reload, the radio button in list can not be checked in the selected value.
The first time load I can not set default selected too.

Re: Get value of Radio Button in List

Posted: Thu Jun 28, 2018 10:13 am
by AbelS
But after reload, the radio button in list can not be checked in the selected value.

I don't get what you mean. Please use an example.

The first time load I can not set default selected too.

To preset the radio button as "checked", set the value to "code". In my earlier example it would be: #std_code := 'CHK'.

Re: Get value of Radio Button in List

Posted: Thu Jun 28, 2018 11:00 am
by hoangtrungcs
Hi AbelS

Thank you so much!

Everything is OK. I can do that by your supported.