web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Finding newest item in...
Power Apps
Answered

Finding newest item in SharePoint list depending on column value

(0) ShareShare
ReportReport
Posted on by 6

Hi all,

 

I'm pretty new to Power Apps and still learning, I'm confusing myself thinking about this so please go easy. I'll step out what I'm trying to do.

 

I have a SharePoint list for Daily Checks on different pieces of Equipment.

Power Apps is used to submit a Daily Check (an Equipment ID number is used to know which Equipment is being checked.)

I want to add some Data Validation when entering the Equipment Hours.

 

For example I would like to check against yesterdays check of Equip001 to see whether or not the Equipment hours is less. But Equip001 wasn't the last check completed in the list. Is this possible?

 

Would it be easier to have separate SharePoint lists for each individual piece of equipment?

Categories:
I have the same question (0)
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @waccampbell 

    All SharePoint lists have a sequential ID. You can sort your list by ID descending and filter for the item.

  • waccampbell Profile Picture
    6 on at

    Thanks for reply.

     

    So would I be able to filter the list by the 'Equipment ID' and then pull the latest result from that filter?

     

    The data validation would only have to check whether the filtered value is greater than the submitting forms value. How would I write this?

     

    Sorry I haven't done much filtering before

  • Verified answer
    Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    Hi @waccampbell 

    With({yourlist: Sort(Splist, ID, Descending)},
     If(
     Lookup(
     yourlist, 'Equipment ID'= Dropdown1.Selected.'Equipment ID", value
     ) > somevalue in your form , 
     Submit(Form1),
     Notify("The value is not > somevalue", Error)
     )
    ) 
     

    You would put this formula in the button that submits the form.  If the value was > the submitted value (here you would use the name of the control in the form with the value to compare against), then the form would submit, otherwise a notification will pop up with a message.  

  • waccampbell Profile Picture
    6 on at

    Absolute legend @Drrickryp !!

    I had to read up about how LookUp works but it I got in the end. Thanks so much

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard