<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Sorting Table by Descending Time In XML View in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623089#M152767</link>
    <description>&lt;P&gt;does your odata service support sort?&lt;/P&gt;</description>
    <pubDate>Mon, 28 May 2018 03:00:02 GMT</pubDate>
    <dc:creator>junwu</dc:creator>
    <dc:date>2018-05-28T03:00:02Z</dc:date>
    <item>
      <title>Sorting Table by Descending Time In XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaq-p/623084</link>
      <description>&lt;P&gt;Hi experts,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;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: &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;Table class="someClass" headerText="Change History"
			   items="{
					path : 'model&amp;gt;entity',
					parameters:{expand : 'entity'},
					 sorter : 
					  { 
					  path : 'model&amp;gt;time',
					  descending : 'true'
					  }
					  
				}"&amp;gt;
				&amp;lt;headerToolbar&amp;gt;
...&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;However, the table is still sorted in ascending order. Please see screenshot of this column below:&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/136288-image1.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Any hints are appreciated. Or am I mistaken and the only way to do this is with a custom comparator?&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 06:05:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaq-p/623084</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-04-30T06:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Table by Descending Time In XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623085#M152763</link>
      <description>&lt;P&gt;Can you check the networks tab and see how the odata sorting call is made to this entity &lt;/P&gt;
  &lt;P&gt;Thanks&lt;/P&gt;
  &lt;P&gt;Viplove&lt;/P&gt;</description>
      <pubDate>Mon, 30 Apr 2018 06:58:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623085#M152763</guid>
      <dc:creator>former_member340030</dc:creator>
      <dc:date>2018-04-30T06:58:30Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Table by Descending Time In XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623086#M152764</link>
      <description>&lt;P&gt;Thank you for your response Viplove. &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;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&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;this.getView().bindElement({
					path:  "/pathToData('"+parameter+"')",
				    model: "model",
				    parameters: {
				      expand: "entitySet1,entitySet2,entitySet3"
				    }
			}&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;So I can only see one batch call in my network tab, screenshot:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/139242-image2.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/139243-image3.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;Is there another way to view the separate call in debugger? Thanks for your help.&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 03:18:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623086#M152764</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-05-01T03:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Table by Descending Time In XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623087#M152765</link>
      <description>&lt;P&gt;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 .. &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;this.getModel().setUseBatch(false);&lt;/P&gt;
  &lt;P&gt;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 &lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;thanks&lt;/P&gt;
  &lt;P&gt;Viplove&lt;/P&gt;</description>
      <pubDate>Tue, 01 May 2018 06:18:29 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623087#M152765</guid>
      <dc:creator>former_member340030</dc:creator>
      <dc:date>2018-05-01T06:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Table by Descending Time In XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623088#M152766</link>
      <description>&lt;P&gt;Sorry about the extremely long response time, I got busy with more important parts of the project, the request is GET MainSet('123456789')/HistorySet?$skip=0&amp;amp;$top=10&amp;amp;$orderby=Utime%20desc&amp;amp;$expand=HistorySet&lt;/P&gt;</description>
      <pubDate>Sun, 27 May 2018 22:43:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623088#M152766</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-05-27T22:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Table by Descending Time In XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623089#M152767</link>
      <description>&lt;P&gt;does your odata service support sort?&lt;/P&gt;</description>
      <pubDate>Mon, 28 May 2018 03:00:02 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623089#M152767</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2018-05-28T03:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Sorting Table by Descending Time In XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623090#M152768</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 00:58:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/sorting-table-by-descending-time-in-xml-view/qaa-p/623090#M152768</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2018-06-04T00:58:53Z</dc:date>
    </item>
  </channel>
</rss>

