cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create Empty MegaCollection Object and add an item to it

ColruytTeam
Honored Contributor

Hi All,

Can any body tell me how to create an empty MegaCOllection Object and how to insert an item in to it.

Colruyt Team
14 Replies

ColruytTeam
Honored Contributor

Hi WIm,

In both the cases am getting

 

Script error "Error(0x800a01a8) : Object required: 'C'" at Line <line num> :
 SampleAttribute.MetaAttributeUpdateTool : Microsoft VBScript runtime error

 

Thanks

Colruyt Team

lionel
MEGA
MEGA

If you want to create a Megacollection from scratch (i.e. not a collection of objects linked to another), you need to initialise your collection first.

 

For example  :

  

Dim myCol
Set myCol = oRoot.getSelection("")

NB : note that oRoot needs to be defined 😉

 

Then you can insert any MEGA Object in your collection :

myCol.Insert myMegaObject

Regards

 

Lionel

veldew
Super Contributor

 

Dim c As MegaCollection
Dim o As MegaObject
c.Insert(o)

 

veldew
Super Contributor

 

 

Dim c As MegaCollection
Dim o As MegaObject
Dim result = c.Add(o)