How to tell UI Designer how to sort items in a collection

Hi, is there a way I can tell the UI designer how to sort items in a collection (composition relatioship of business objects)? The individual item in the collection has various attributes that could be used to sort asc or desc.

Hi,

You can sort your collection by doing a Javascript expression and use the array sort function
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort

In javascript expression you can access to your collection defined as variable with $data:

return $data.myCollection.sort();

Otherwise, you can sort your data on backend side by using BDM custom queries and associated REST API
http://documentation.bonitasoft.com/business-data-model#queries
http://documentation.bonitasoft.com/bdm-api-0#businessdataquery