Community
Showing results for 
Search instead for 
Do you mean 
Reply

Sorting output via OData

Accepted Solution Solved
Copper Contributor
Posts: 33
Country: Germany
Accepted Solution

Sorting output via OData

[ Edited ]

Hi,

 

I'm trying to access the WebAPI via

https://ourTestServer/oppurtunities/{someID}/history?$filter=historyTypeID eq 1000&$orderby=reallyAnythingAtAll

and the data will just not be transmitted in any order. No matter what field I'll order by, using asc or desc as switches (or none at all), dropping the filter clause, nothing makes a difference, as far as I can see.

 

Any input on this?


Accepted Solutions
Solution
Accepted by topic author Thomas_Benn-MS
‎05-23-2018 06:35 AM
Administrator
Posts: 1,372
Country: United_Kingdom

Re: Sorting output via OData

It looks like this should have been part of the .279 release.

Make sure your API is fully up to date and let me know if it's working.

View solution in original post


All Replies
Administrator
Posts: 1,372
Country: United_Kingdom

Re: Sorting output via OData

Hi Thomas,

I've tested and I'm able to replicate this. I'll raise it with the API developer team.

Copper Contributor
Posts: 33
Country: Germany

Re: Sorting output via OData

Solid, thank you.
Copper Contributor
Posts: 33
Country: Germany

Re: Sorting output via OData

Hi Jonny,

 

any news on this? It would really make my application look good instead of decent. Smiley Wink

Administrator
Posts: 1,372
Country: United_Kingdom

Re: Sorting output via OData

Hi Thomas,

I know the dev team were working on implementing this when I raised it initially, with the intention of pushing it out pretty quick.

I'll try to find out if there's been any update.
Solution
Accepted by topic author Thomas_Benn-MS
‎05-23-2018 06:35 AM
Administrator
Posts: 1,372
Country: United_Kingdom

Re: Sorting output via OData

It looks like this should have been part of the .279 release.

Make sure your API is fully up to date and let me know if it's working.
Copper Contributor
Posts: 33
Country: Germany

Re: Sorting output via OData

Thank you.
Indeed, there seems to be "more" sorting now, but in the one case that I really need, it appears to still not work.

Using my php script or using Postman, I can not get
https://ourTestServer/oppurtunities/{someID}/history?$filter=historyTypeID eq 1000&$orderby=reallyAnythingAtAll
to function as intended. There is just no visible difference in the order data comes in, no matter what I orderby, using "desc" to change order or not.

Can you verify this? Am I making some kind of mistake?
Highlighted
Administrator
Posts: 1,372
Country: United_Kingdom

Re: Sorting output via OData

Hi Thomas,

I'm not able to replicate the same issue, I am able to order history results on v1.0.279.0 of the API.

If you go to /api/system what apiVersion is being returned?
Copper Contributor
Posts: 33
Country: Germany

Re: Sorting output via OData

You're right. I was under the impression we had already updated that specific test environment, but we hadn't. Now, with 279, it all works like a charm.

Thank you. Smiley Happy