Skip to Content
0
Apr 30, 2018 at 06:05 AM

Sorting Table by Descending Time In XML View

3363 Views

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.

Attachments

image1.png (4.1 kB)