Assuming allowedentries is required, the following result was found.
l_RememberLookup.add(v_SelectedLookup); } } } // // clear lookup clear myLookup; // // get list of all valid entries l_AllowedEntries = {}; for each v_AllowedID in myForm[ID != 0] { v_thisID = v_AllowedID.ID; l_AllowedEntries.add(v_thisID); } // //...