Message Boards

CheckBox in List Screenlet

thumbnail
Asad Saeed Awan, modified 7 Years ago.

CheckBox in List Screenlet

Regular Member Posts: 126 Join Date: 1/16/15 Recent Posts
Hello Community,

I have a scenario here. I have successfully implemented List Screenlet. In addition to this I want to add checkbox as last item of my list. And on checking the box it returns the list item(Let's suppose it is Id). After that there is a save button at the end of the screen. On clicking that button I want all the list Id's which are checked. Please see image as a reference.
thumbnail
Victor Galan, modified 7 Years ago.

RE: CheckBox in List Screenlet

Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
You need to save the selected state in your model, so you can add a new property in your model called "selected" and when you receive a click event change that property in the item selected.
When the user clicks the button you can simply filter all the entries an get only the selected ones
thumbnail
Asad Saeed Awan, modified 7 Years ago.

RE: CheckBox in List Screenlet

Regular Member Posts: 126 Join Date: 1/16/15 Recent Posts
You mean to say when a user clicks the checkbox the boolean variable "selected" gets true ?
thumbnail
Victor Galan, modified 7 Years ago.

RE: CheckBox in List Screenlet

Regular Member Posts: 144 Join Date: 6/14/16 Recent Posts
A variable in the model associated to that row, yes, and then you can filter the list and get only the selected ones

I hope it helps
Regards