Update record from Checkbox
I have written some script that dynamically populates a checkbox with records from another form (this works OK). The user then selects the checkbox options of their choice and the following "on user update" script updates the corresponding records back in the other form. This code also works OK but only if the user only selects 1 checkbox option. If 2 or more options are selected then I get the error message "Unable to update data on the form variable". I should add that the checkbox is dynamically populated with an infinte number of options. Can anybody see my mistake?
if (input.Checkbox_1.size() == 0) //identify if checkbox option if selected
{
}
else
{
tick = Deviation_list [Description == input.Checkbox_1.toString()]; //fetch the record from the checkbox
tick.Status = "Closed"; //updates the record in the other form
Checkbox_1.deselect(0); //deselect the checkbox option
}