Add picklist in subform lookup

Add picklist in subform lookup

Hello,

I am trying to rewrite a script that works on a from as parent form, to the same form when is is a subform. Here is what I did in the form itself :

RefCat = Offre_de_produits.distinct(Categorie_OFFRE);
clear Categorie_LIGNE;
for each  Record in RefCat
{
    input.Categorie_LIGNE:ui.add(Offre_de_produits[Categorie_OFFRE == Record].ID);
}

I tried the following on the new parent form on add of a line, and it doesn't work :

clear row.Categorie_LIGNE;
RefCat = Offre_de_produits.distinct(Categorie_OFFRE);
for each Record in RefCat
{
    insert.row.Categorie_LIGNE:ui.append(Offre_de_produits[Categorie_OFFRE==Record].ID);

What am i missing ?

Sylvain