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 / Filter data source and...
Power Apps
Answered

Filter data source and return last record

(0) ShareShare
ReportReport
Posted on by 820

Hi

I have a Dataverse as a datasource

What i want to do in a canvas app text field i want to filter the datasource table where ColumnName=comobox.selected.value and

 

then return to this combobox last submited particular column record.

 

For finding the last this works but i want to be sure it is the last on the particular selected project number that user is working

 

First(FirstN(Sort(Components,'Created On' Descending),1)).'Component Name'

 

But as told i want to combine it with Filtering datasource with this filter(This filters my gallery)

 

Filter(Components,'Projekto nuoroda'.'Projekto pavadinimas'=FilterProjektas.Selected.'Projekto pavadinimas)

 

How do i combine these together?

Categories:
I have the same question (0)
  • Verified answer
    NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi,

    You can try using below formula 

    First(FirstN(Sort(Filter(Components,'Projekto nuoroda'.'Projekto pavadinimas'=FilterProjektas.Selected.'Projekto pavadinimas),'Created On' Descending),1)).'Component Name'

  • Verified answer
    MVP-Phipps Profile Picture
    3,521 Super User 2024 Season 1 on at

    Hi @jja , you need the following:

    First(FirstN(Sort(Filter(Components,'Projekto nuoroda'.'Projekto pavadinimas'=FilterProjektas.Selected.'Projekto pavadinimas),'Created On' Descending),1)).'Component Name'

    Please Accept as Solution if it solves your question. Or just give it a Thumbs Up if it is helpful because this can help others.

    LinkedIn: https://www.linkedin.com/in/charlie-phipps-%F0%9F%91%A8%E2%80%8D%F0%9F%92%BB-91338715b/
    YouTube: https://www.youtube.com/channel/UChmFBGU1YKIU91sNMQ7buGg
    Twitter: https://twitter.com/phipps0218

     

  • julijazas Profile Picture
    820 on at

    @phipps0218 @NandiniBhagya20 

    Absolutelly love you guys!

  • julijazas Profile Picture
    820 on at

    @phipps0218 @NandiniBhagya20 

    I got happy too early...

     

    How should i now Patch a dataverse lookup field with this filtered last value?

     

    Now my original Patch where i patch last gallery item looks like this:

    Medžiaga:LookUp(Materials,Pavadinimas=Last(galleryGrid.AllItems).Medžiaga.Pavadinimas),

    And i need to replace to patch last filtered record:

    First(FirstN(Sort(Filter(Components,'Projekto nuoroda'.'Projekto pavadinimas'=FilterProjektas.Selected.'Projekto pavadinimas'),'Created On',Descending),1)).Medžiaga.Pavadinimas

    If i just replace after = it doesnt work

     

     

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Try replacing it with below -

    Last(FirstN(Sort(Filter(Components,'Projekto nuoroda'.'Projekto pavadinimas'=FilterProjektas.Selected.'Projekto pavadinimas'),'Created On',Descending),1)).Medžiaga.Pavadinimas

  • julijazas Profile Picture
    820 on at

    @NandiniBhagya20 

    I have error if i just replace 1:1

     

    jja_0-1663342627144.png

     

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 136 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 109 Super User 2026 Season 2

Last 30 days Overall leaderboard