Multi Select Checklist

Multi Select Checklist

Hi, I have a multi select checklist which changes acording to differenct criteria selected within my form. When the form loads on edit, the exsisting selectections, which have been checked, do not show up as checked on load.

I figure I need to use the Select / Deselect feature, and fetch the what the current record should be, and on load, check the boxes.

Something like:


current_equipment_type == Incident_Report.Equipment_Type_New

Equipment_Type_New.select(current_equipment_type)

Is this down the right track?
Edited:
 
Bit more detail on this, when my form loads on edit, the multi select boxes (of which there are 200) get reduced to just a few depending on what site, and what type of fault. The result is a short list. When this shortlist is created the checkboxes that were checked innitially on load become deselected. I want them to be reselected once the list becomes condenced down.
 
When the form opens I can put the current selection into a variable:
 


current_equipment_selections = input.Equipment_List_New;

 
then my form reduces the picklist down, or clears it completely if the one is not selected so I don't end up with a massive list if the incident is not equipment related, and thus has no fault type:
 


fault  =  Equipment_List  [((Location == input.Location && Status == "Active") && Fault_Type == input.Fault_Type1)];
for each f in fault
{
    Equipment_List_New:ui.add(f.Equipment);
}
if (fault.ID.getall().size()  <  0)
{
    clear Equipment_List_New;
}

then after this is done I want to reapply the selection from the start:
 


Equipment_List_New.select(current_equipment_selections);


but this doesn't work, as I think the variable must change as the picklist changes.... I just end up with a constant "Please wait".
 
 
 
I am thinking that this problem is something related to :
 
 
any help would be greatly appreciated.