Help with scripting function

Help with scripting function

Please can someone assist me with this. I've created a simple app which consists only of 2 forms to simplify the problem. The forms are Quote and Items. Items is a subform of the quote form. I'm trying to script a custom function which will add a new record in the Quote View which has the same data as the original record INCLUDING the data from the subform. Here is what I've done:

 void revise(int ID)
{
    dat  =  Quote  [ID == input.ID.toLong()];
    subform = dat.Items;
    name = dat.Customer;
    insert into Quote
    [
        Added_User = zoho.loginuser
        Customer = name
    ]
    for each rec in subform
    {
        
        insert into Quote
        [
            Items = rec.Category

        ]
    }
}

And this is the error message:  Expected List String Expression, Found STRING Expression for 'Items'

And please, the workaround of duplicating the record is not going to work for what I need to do.

Any help would be greatly appreciated.