Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
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

  • Michael E. Gernaey Profile Picture
    43,220 Super User 2025 Season 1 on at
    Re: Lookup Nearest Date in one list to update second list

    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >