Updating a lookup field issue

Updating a lookup field issue

Hi All,

I have a subform that has a single select lookup that needs to be replaced with a multiple select lookup. Both lookups exist now in the form and access the same source "Add_Labels > Labels_Description".

Before deleting the single select lookup field, I need to copy the single select data to the multi-select lookup field so I've created a temporay form and script to process make this change - and this is where I'm stuck. 

I appreciate that the mult-select lookup requires the record ID so I've written a processing script that for each record in Add_Labels that the field Labels_Description isn't null returns the ID - but I cannot find a way of adding this data to the multi-select field without error. 

The single select lookup is "Label_Description_DELETE".
The multi select lookup is "Label_Details".

if (input.Decision_box)
{
    label_count = SubForm_Sales_Line_Items[(Label_Description_DELETE is not null)].count();
    alert(label_count); Shows 155 in Live mode
    for each entry in SubForm_Sales_Line_Items  [(Label_Description_DELETE is not null)]
    {
        label_rec  =  SubForm_Sales_Line_Items  [Label_Description_DELETE = entry.Label_Description_DELETE];
        //label_rec.Label_Details = label_rec.Label_Description_DELETE.getall(); Error
        alert(label_rec.ID); Shows each record ID correctly
        entry.Label_Details:ui.append(label_rec.ID); Error - Variable 'entry' is not defined
    }
}

Any clue as to what I'm not understanding please?

Many thanks for any replies!