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

Notifications

Announcements

Community site session details

Community site session details

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

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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard