Get value of Radio Button in List

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
hoangtrungcs
Posts: 14
Joined: Wed Sep 21, 2016 12:54 pm

Get value of Radio Button in List

Post by hoangtrungcs » Thu Jun 21, 2018 7:31 pm

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!

hoangtrungcs
Posts: 14
Joined: Wed Sep 21, 2016 12:54 pm

Re: Get value of Radio Button in List

Post by hoangtrungcs » Tue Jun 26, 2018 1:07 pm

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.

AbelS
Posts: 25
Joined: Wed Nov 16, 2016 1:43 pm
Location: Sydney, Australia
Contact:

Re: Get value of Radio Button in List

Post by AbelS » Wed Jun 27, 2018 10:07 am

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 1216 times
Remember that for the value to be posted, the column must be input capable, not just text output.

hoangtrungcs
Posts: 14
Joined: Wed Sep 21, 2016 12:54 pm

Re: Get value of Radio Button in List

Post by hoangtrungcs » Wed Jun 27, 2018 3:58 pm

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.

AbelS
Posts: 25
Joined: Wed Nov 16, 2016 1:43 pm
Location: Sydney, Australia
Contact:

Re: Get value of Radio Button in List

Post by AbelS » Thu Jun 28, 2018 10:13 am

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'.

hoangtrungcs
Posts: 14
Joined: Wed Sep 21, 2016 12:54 pm

Re: Get value of Radio Button in List

Post by hoangtrungcs » Thu Jun 28, 2018 11:00 am

Hi AbelS

Thank you so much!

Everything is OK. I can do that by your supported.
Attachments
testradio.JPG
testradio.JPG (35.22 KiB) Viewed 1166 times

Post Reply