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 / Get items Order By usi...
Power Automate
Answered

Get items Order By using Day from Date

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi community,

 

Is there a way to Order/Sort the Get Items from a SP list based on the Day in a date?

 

I'm creating a HTML table of Birthdays for the Month and sending via email. This works fine but I was wondering if it's possible to sort the birthdays by Day before creating the table? My basic process is:

 

Get Items --> Filter Array (Get Items) to current Month only on Birthday field --> Create HTML Table (Filter Array)

 

I've tried a few things with my latest (failed) iteration of my Order By code being:

int(split(formatDateTime(Item().Date_x0020_of_x0020_Birth,'MM-dd'),'-')?[1]) asc

 

Error: " Unable to process template language expressions in action 'Get_items'  ... cannot be evaluated because property 'Date_x0020_of_x0020_Birth' cannot be selected."

 

Any help would be great!

 

Thanks

PS I was able to use Date_x0020_of_x0020_Birth asc but this sorts oldest person to youngest person, which isn't what I want.

 

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

    Hi @Anonymous,

     

    The order By only support the "columnName asc" or "columnName desc", not support add expression into the order by.

    URI Conventions (OData Version 2.0) · OData - the Best Way to REST

    For example:

    Screenshot 2021-01-15 111852.jpg

     

    As a workaround, you could create a calculate column in the SharePoint list, and set its shows as MM formate of "Date of Birth"

    MONTH function - SharePoint (microsoft.com)

    Then use the calculate column to approach the Order By:

    "CaculateColumn asc"

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-litu-msft 

    Thanks Lin,

    I thought that may have been the case. I’ll consider the calculated column.

     

    Cheers

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard