REST API - bdm - sort

Hi,

With bdm REST API, we can specify the page count (parameter : “p=”) and the number of elements (parameter : “c=”) but we can’t specify the sort.

Why is this impossible ?

How are you dealing with a lot of rows :
1 - you have created a custom REST API to allow the sort ;
2 - you have developped your UI with another langage (i.e. jsf, …) ;
3 - you use the default REST API, and you get all rows with slowless problems.

Regards

It’s not impossible, you just have to create your query with ORDER BY statement…then use the correct query for what you want.

You could also develop a Custom Widget which uses a different table which implements the necessary call backs to fulfill your requirements,

However it looks like you’ve got multiple issues, please don’t mix them as they become difficult to answer:

1 - you have created a custom REST API to allow the sort ;

1.1 - In the BDM we used defined queries to sort (for fixed sorting requirements)
1.2 - Developed a Custom Widget for dynamic sorting - do a google search for angular table sorting
1.2 - in few cases we’ve purchased a JavaScript table and use that in a custom widget, again for dynamic sorting

2 - you have developed your UI with another language (i.e. jsf, …) ;

Nope.

3 - you use the default REST API, and you get all rows with slowless problems.

Again - Nope…

regards
Seán

PS: As this reply answers your question, please mark as resolved by ticking the tick mark on the left of this reply.

I have already created an custom widget based on an ng-table (http://ng-table.com/#/).

This widget can deal with local data (json array) or an ajax loading.

The problem come with the ajax loading : how can we to the BDM REST API to dynamically sort the results ?

Could i do something like :

SELECT m 
FROM MyObject m 
WHERE m.code = :code
  AND m.status.code = :status
ORDER BY :dynamicSort

Or should I create a query by column available for sorting ?

Regards

Any ideas ?