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

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
    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
    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

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard