cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sababneh
Advocate IV
Advocate IV

[Question] Lookup last row

Hello wonderful community,

 

I have a question concerning how to lookup the last row in a table when I don't know how many rows.

 

For example, I have the table below, with columns: ID, Ticket ID, First Name, Last Name, Company

 

  • Row 1 - JU192 - James - Antwan - Trans. INC
  • Row 2 - JU193 - Jack - Belford - XYZ INC
  • Row 3 - JU192 - Anthon - Jacks - Unierst INC
  • Row 4 - JU192 - Jimmy - McField - Standom INC
  • Row 5 - JU194 - Neo - McField - FieldMax INC

How can I look up the column Ticket ID = JU192 column Company, and to give me the last results which is Standom INC

 

Thanks 🙂

13 REPLIES 13

I've tried ClearCollect into Sample and then Last on the containts of Sample. And worked... I wanted to show a popup screen with the last record after submiting a new form (let's say order No)

 

Wizkid_A
Frequent Visitor

Hey All, 

 

I'm trying the same thing. This formula works, it shows me the last record in the SharePoint list:

 

Last('1. ISQC 1 Quality Control').'Who is ISQC?'

 

Now I want to add a Filter. So I can filter on the Firm. But I get errors. I used the same formula as @Shanescows 

Last(Filter('1. ISQC 1 Quality Control', 'Firm'= Firm.Text, 'Who is ISQC?').'Who is ISQC?'

 

But when I try to use this I get the following error: 
"the formula contains parenclose where eof is expected"

Am I missing something?

 

Thanks in advance!

 

Thank you Shane. I was looking for exactly that!

This: ".ColumnYouWantToReturn" saved my day!

SukhRehal
Regular Visitor

Hi All,

I have tried Shanes suggestion and it works in general but does not work when trying to bring back a choice field. (I am working of a Sharepoint list)

 

My formula is like 

Last(Filter(DataSource, Column = Value, Column.Value)).Column.Value

 

Any suggestions?

 

Thank you,

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,303)