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 / Last function does not...
Power Apps
Answered

Last function does not work?

(0) ShareShare
ReportReport
Posted on by 565

Hi,

 

I have this formula in a button:

 

UpdateContext({LastUserID:Last(Filter(tbd_RelatedRequests, Origin="TKO")).UserRequestID });

 

The value of the variable LastUserID give me the result of: 1000018

 

But in the dataverse table, the latest column value of UserRequestID is 1000019

Dataverse.png

 

It seems like the Last function does not make the search always, like it save the value in a cache or something.

What I am doing wrong?

Thanks in advance!

I have the same question (0)
  • Verified answer
    EmilioRoqueta69 Profile Picture
    565 on at

    SOLVED with this:

     

    UpdateContext({LastUserID: First(Sort(Filter(tbd_RelatedRequests, Origin="TKO"), 'Created On' , SortOrder.Descending)).UserRequestID });

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard