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 Automate / Lookup Nearest Date in...
Power Automate
Unanswered

Lookup Nearest Date in one list to update second list

(0) ShareShare
ReportReport
Posted on by

Hi

 

I have a list of "clients" and a list of "tasks". When a new task is added I need to check through the tasks list for that client id and if the new task due date added is closer than the existing "soonest date"  field in the client list, update "soonest date" to the newest date. 

I understand how to update between the lists but I am not sure how to get it to compare the dates.

 

Thanks

Categories:
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,968 Moderator on at

    Hello,

     

    Is this a planner task list, or a SharePoint task list?

     

    If you have the list when you query your list

     

     

    If(newdate < First(SortByColumns(Filter(mylist, clientid = 12345), datefield, descending)),
    it is less so swap or whatever
    ,
    it is not so add it
    );
    
    //give that a shot. since I dont know the lists I'm guessing here a little at your needed format

    Cheers
    --------------------------------------------------------------------------------
    If I had answered your question, please mark your post as Solved
    If you like my post please give it a thumbs up
    Thanks
    Michael Gernaey MCT | MCSE | Expert | Ex-Microsoft
    https://gernaeysoftware.com

     

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 Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard