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 Apps / First and Last Query
Power Apps
Answered

First and Last Query

(0) ShareShare
ReportReport
Posted on by 14

Hi,

I am working on an app and i am trying to find the first entry and last entry of a Work Order.

I know how to get the first and last entry from the list, although i am struggling to get the first and last entry based on a work order ID.

Hope this makes sense. 

Cheers

Categories:
I have the same question (0)
  • Verified answer
    PaulD1 Profile Picture
    2,914 on at

    Perform the First/Last on the Filter of the datasource? E.g.

     

    First(Filter(MyDataSource, ID = DesiredID))

     

    Can you post a bit more detail?

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @gman91 ,

    Do you want to sort the table according to work order ID and find the first, last record?

    Try this formula:

    First(Sort(tablename,order ID))

    Last(Sort(tablename,order ID))

     

    Best regards,

    Community Support Team _ Phoebe Liu

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 Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard