Hi experts,
I believe I must be missing something quite simple. I am trying to sort my table by time in descending order. My data is bound to my table from a SAP gateway oData service. The time is in EDM.string format therefore PT00HH00MM00S. Bindings are working fine and sorting by ascending works as well. I am currently trying to sort by descending using the following parameters:
<Table class="someClass" headerText="Change History"
items="{
path : 'model>entity',
parameters:{expand : 'entity'},
sorter :
{
path : 'model>time',
descending : 'true'
}
}">
<headerToolbar>
...
However, the table is still sorted in ascending order. Please see screenshot of this column below:

Any hints are appreciated. Or am I mistaken and the only way to do this is with a custom comparator?
Thank you.
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Can you check the networks tab and see how the odata sorting call is made to this entity
Thanks
Viplove
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you for your response Viplove.
I tried to isolate this call in the network tab but was unable to. For some context, I have this oData model two-way bound to the element on the parent controller. eg
this.getView().bindElement({
path: "/pathToData('"+parameter+"')",
model: "model",
parameters: {
expand: "entitySet1,entitySet2,entitySet3"
}
}
So I can only see one batch call in my network tab, screenshot:


Is there another way to view the separate call in debugger? Thanks for your help.
Yeah you can see the individual batch request for debugging purposes later on just remove this command again .. Just put this line of code in the component.js file ..
this.getModel().setUseBatch(false);
Actually putting this will make multiple calls to the server which will reduce the performance but for debugging we can see separate odata calls to server
thanks
Viplove
We decided to do our sorting on the backend for this table, we currently don't need any customisable sorting or filtering for this table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
does your odata service support sort?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.