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 / Look up within a list ...
Power Automate
Answered

Look up within a list between 2 dates

(0) ShareShare
ReportReport
Posted on by 19

My scenario is a simple SP list A which contains 2 dates/ time (start and finish) and a person, who is "on call" for that period (usually whole weeks but can vary).   When a user creates an item in another list B they give the date of that event and I want to lookup up the on-call staff member based on the event's finish date/ time and add their details to list B.  If the event is too far in the future, the on-call staff may not be selected

 

Any pointers on how to achieve this? TIA

Categories:
I have the same question (0)
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @padavison ï¼Œ

    Is your personnel column a single-select or multiple-select personnel column?

    Could you please post a screenshot of both lists?

    Best Regards,

    Sunshine Gu

  • padavison Profile Picture
    19 on at

    Thank you. This is List A. The SRO is a single-select of person and will be maintained every month for 2 or 3 months ahead.

    padavison_0-1716881680313.png

    This is list B which records events.  I want to populate the SRO column from List A based on date in End Date of List B.  A flow triggers when an event is created which sends an ICS attachment of the event to the creator and their "buddy" and I want that to include relevant SRO info for that particular day.

    padavison_1-1716882196353.png

     

  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @padavison ,

    Please check this test:

    My SharePoint List A:

    vyetonggumsft_5-1716884779231.png

    My SharePoint List B:

    vyetonggumsft_6-1716884888603.png

    My Flow Overall Preview:

    vyetonggumsft_0-1716884425604.png

    My Flow Configuration Parameters:

    vyetonggumsft_2-1716884578004.png

    Enddateandtime ge '@{items('Apply_to_each')?['StartDate']}' and Enddateandtime le '@{items('Apply_to_each')?['EndDate']}'
    
    length(outputs('Get_items_2')?['body/value'])

    vyetonggumsft_3-1716884716506.png

    The Result:

    vyetonggumsft_4-1716884740790.png

    Best Regards,

    Sunshine Gu

     

     

  • padavison Profile Picture
    19 on at

    Thank you Mr Gu (or can I call you Sunshine?) for your excellent insights. Works perfectly (so far). 

  • padavison Profile Picture
    19 on at

    A little follow-up. I have this added to the end of a flow the triggers when a new item is created in List B. This updates the new item of course with the SRO but also updates all existing items in List B. This adjusts the Modified field of all the items which is not ideal and could also get quite extensive in number. 

     

    Is there a simple way of restricting the update to SRO in list B only where this field is currently empty (i.e. a new item)?  There are so few changes to SRO that an update to all items is not justified. Thanks again

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard