cancel
Showing results for 
Search instead for 
Did you mean: 

How to change Item order in MegaCollection using API

Solved
Occasional Contributor

How to change Item order in MegaCollection using API

Using API, how can you use the MEGA Operator “Order” to reorder Items in a collection automatically?

It would be enough to turn of alphabetic ordering and instead order chronologically:

Calling add(“B”), add(“A”), add(“C”) in order results in the Items ordered A,B,C. We are trying to preserve the order (B,A,C), or manually set it.

How can we do this?

Tags (3)
4 Replies
Regular Contributor

Re: How to change Item order in MegaCollection using API

GetCollection("<name collection>", "<sorting criteria>")

 

eg. GetCollection("Functional Process", "Name")

 

regards

 

stijn

Occasional Contributor

Re: How to change Item order in MegaCollection using API

This is not what we want to achieve. We want to modify the Order (of Book Part Elements) so that the generated Book does not present the Parts in alphabetical order but in the order we specify.

Occasional Contributor

Re: How to change Item order in MegaCollection using API

Did you use the criteria "order" (manual) or "creation date" (automatic) ?

I think it's working in your case :

Exemple01.png

Occasional Contributor

Re: How to change Item order in MegaCollection using API

This is still not what we wanted to do, but we have found out ourselves:
You have to get the Relationship of each MegaObject in the collection and set its “Order”-Property. The sorting will then be in ascending order of the integers put into “Order”.