web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sytnax for Odata Order By
Power Automate
Answered

Sytnax for Odata Order By

(2) ShareShare
ReportReport
Posted on by 358

Is it possible to use multiple fields in the order by odata filter on a SharePoint get items action?  i.e. if I want to sort by Title Field, then Date Field as an example:

 

Title asc and Date asc

 

What is the correct way to structure that - it appears to be differen than the filter query sytax.

Categories:
I have the same question (0)
  • Verified answer
    v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @WiggityZwiggity,

     

    The workable Sytnax for the order by should be:

    Title asc, Date asc

    Image reference:

    59.PNG

     

    The Sytnax usage is described here:

    Use OData query operations in SharePoint REST requests

    For orderby:

    "

    Use the $orderby query option to specify how to sort the items in your query return set. To sort by multiple fields, specify a comma-separated list of fields. You can also specify whether to sort the items in ascending or descending order by appending the asc or desc keyword to your query.

    "

    Regards,

    Michael

  • WiggityZwiggity Profile Picture
    358 on at

    That's awesome.  Is there a way to also apply this sorting on Unions?  i.e. if I am joining 2 arrays, and I want the combined results to sort?  the union(array1,array2) expression doesn't seem to allow for this.

  • nadiaardilesc99 Profile Picture
    2 on at

    Hi, thanks for your solution. I was wondering if i want to order number, power automate says this" !CKIxd!Syntax error at position 22 in 'Fecha Final_Modificada desc'. Ploc !
    inner exception: !CKIxd!Syntax error at position 22 in 'Fecha Final_Modificada desc'. Ploc !
    clientRequestId: 44c196fa-13c6-4fef-87f2-0877e196689e

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard