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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Need to take a value from one SharePoint Online list and see if it exists in another that may have duplicates

(0) ShareShare
ReportReport
Posted on by

Use Case

I have an existing SharePoint Online (SPO) list where users enter a Date (no time) and indicate their work status (telework, in office, etc). I have a second list that with a meaningless title field and a date column that indicates corporate-recognized holidays. I need to produce email notifications according to the following schedule:

  • Monday, Tuesday, and Wednesday: Send a notification at the scheduled time with an HTML table that includes the following work status data:
    • Date
    • Employee Name
    • Work Status
  • Thursday: This notification should provide the same data as Mon-Wed, but must ALSO include records for Friday
  • All dates: if today is represented by Day 0 and tomorrow is Day 1, when Day 0 is followed by a corporate-recognized holiday, the notification should include data from Day 0 and Day 2.

Issue Description

I think I've figured out most parts of this, but there's a step where I Get Items from the SPO holidays list, then I want to see if my variable TOMORROW exists in the holidays list. I'm attempting to filter the holidays list using the TOMORROW variable and if I add a compose step, I can see that it is correctly grabbing the dates in the format I expect. 

 

Next, I'm trying to get a boolean using a Condition. When I add the Condition, PA automatically creates a "For Each" condition, so I'm getting multiple outputs from this step in the flow where I really only want or need one: either TOMORROW returns a hit in the holidays table or it doesn't; the fact that there are multiple working days to check is irrelevant; if TOMORROW is a holiday for Tom, it's a holiday for Jane. 

 

Screenshots:

vtkpaul_0-1667444115789.png

vtkpaul_1-1667444168549.png

 

Flow Outcome

In this flow, if TOMORROW has a hit in the holidays list, I'm successfully activating the True condition, but it loops for each person's work status submission and that's no good. I need to get to a table that combines all of them for the reporting requirement on that specific day of the week.

I have another workflow that reliably produces the table I need:

 

vtkpaul_2-1667444482865.png

vtkpaul_3-1667444524115.png

 

Try as I might, I cannot get this same workflow to produce a table on that conditional flow. Any idea what I'm doing wrong here?

I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at
    Re: Need to take a value from one SharePoint Online list and see if it exists in another that may have duplicates

    Hi @Anonymous ,

     

    For the Condition control, what's the expression you are using? It seems like you have selected a column of the SharePoint list in dynamic contents, please try and use below instead:

    length(outputs('Get_items')?['body/value'])

     

    Best regards,

  • Verified answer
    Community Power Platform Member Profile Picture
    on at
    Re: Need to take a value from one SharePoint Online list and see if it exists in another that may have duplicates

    @v-jefferni Here's what I've got plugged in:

    length(outputs('Get_items')?['body/value'])

    Look like we landed on the same approach, only I probably stumbled onto it be accident. 😄

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard