‎17-04-2015 10:44 AM - edited ‎17-04-2015 01:47 PM
Hi.
When looking at Entity (DM) properties in MEGA, under the Attributes tab the Attributes are listed and can be sequenced using reorganize.
I am using GetCollection in a VB Script to bring back Attribute (DM) objects for an Entity (DM) and want to get them ordered in the same sequence as they appear in the properties tab.
Can someone advise me how to locate the sequence key so I can sort by this?
Any help much appreciated....
Craig
Solved! Go to Solution.
‎27-04-2015 03:06 PM
Hi Lionel.
Sorry for the late reply but I have been on leave.
That works perfectly. Thank you very much for you help..
‎17-04-2015 03:47 PM
Hello Craig,
in a getCollection, you can add the attribut on which your collection should be sorted.
For example, in the display of an entity's properties, attributes are displayed by order --> You then need to add the "order" attribute to your getCollection : getCollection(<link>, <sort attribute 1>, <sort attribute 2>...)
For exemple :
Set oEntity = getObjectFromId("MUIH5M4LDvR0") For Each oAttribute in oEntity.GetCollection("Attribut (MD)", "Order") Print oAttribute.getProp("Short Name") Next
Regards,
Lionel