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

1
0
-1

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.

1 answer

1
+1
-1

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...

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
Notifications