Push collection into collection row

I have a “parent” $Collection and in a for each loop trying to push a child $optioncol collection into a row.

//Using a counter to get current row


Bit confused as cannot get either option to work get an unknown member function error

Try this




but if you have

$Collection[$i-1]:=$optioncol // $optioncol have to be a collection

this would work.

Thanks for reply,

It seems $Collection[$i-1] is an object not a collection so cant use .push To add a element you have to use

OB SET($Collection[$i-1];"options";$optioncol)
$Collection[$i-1]:=new Object

Got it. I didnt explain very well. I was trying to insert an extra child element.