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 / Why isn't the flow cho...
Power Automate
Answered

Why isn't the flow choosing only the cases that apply to the expiration date?

(0) ShareShare
ReportReport
Posted on by 379

The Flow is supposed to send an email when the expiration date is near or already expired for the assigned person and it is bringing me all of them!

These AED will expire on the following dates:

Building

Brand

Pads Expiration date

Battery Installation Date

Battery Expiration Date

Anderson Home

Philips HeartStart Onsite

2025-06-13

2027-06-09

2023-06-05

Tucker Home

Philips HeartStart OnSite

2024-07-10

2019-12-09

2023-12-09

Follet

Philips HeartStart FRx

2025-07-27

2023-06-05

2027-06-05

Inn

Philips HeartStart FRx

2024-04-02

2019-11-09

2023-11-09

Jamail Home

Philips HeartStart FRx

2025-07-27

2023-06-05

2027-06-05

Kilroy Home

Philips HeartStart OnSite

2024-07-10

2021-02-01

2025-02-01

Rosenthal Home

Philips HeartStart OnSIte

2025-06-13

2023-06-05

2027-06-05

Tuttle

Philips HeartStart OnSite

2025-06-13

2023-06-05

2027-06-05

Weekley Home

Philips HeartStart FRx

2025-07-27

2023-06-06

2027-06-06

Café/SSGGC

Philips HeartStart FRx

2025-03-02

2023-02-03

2027-02-02

Streit E & E Building Restroom

Philips HeartStart OnSite

2024-03-02

2021-03-01

2025-03-02

Streit E & E Building Shipping

Philips HeartStart FRx

2024-01-04

2020-07-02

2024-07-02

Streit E & E Building Ceramics

Philips HeartStart OnSite

2024-03-02

2021-03-02

2025-03-25

Streit E & Building StoneCast

Philips HeartStart OnSite

2023-09-02

2021-12-02

2025-12-02

Horticulture

Philips HeartStart FRx

2024-04-02

2023-02-02

2027-02-02

Reynolds

Philips HeartStart FRx

2025-03-02

2023-03-02

2027-03-02

Reynolds

Philips HeartStart FRx

2025-07-27

2023-06-06

2027-06-06

Worship Center

Philips HeartStart FRx

2025-02-02

2023-03-02

2027-03-02

Grand Parkway

Philips HeartStart OnSite

2024-07-04

2023-04-01

2027-04-01

 

I include my Flow: 

lcdelgado_0-1690819466568.png

lcdelgado_4-1690819729582.png

 

lcdelgado_1-1690819536178.png

lcdelgado_2-1690819574673.pnglcdelgado_3-1690819615786.png

lcdelgado_5-1690819770619.png

Any advice will be appreciated 🙂

 

 

Categories:
  • jiwhite Profile Picture
    500 on at

    What are the formulas that you use in the expressions? It helps to add them as notes in the connectors.

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Filter Array 2 is using the values from the SharePoint list Get Items.

     

    Filter Array 2 should be using Filter Array as the source.

  • lcdelgado Profile Picture
    379 on at

    Can you show me how? Thanks 

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    In the SharePoint list settings of the list you are using in Get Items action, what are the column types?

     

    I added an example screenshot of the SharePoint list settings for my test list.

     

    Example SharePoint List SettingsExample SharePoint List Settings

     

    Is your column Battery Expiration Date a Single line of text? Or is it a Date and Time type column?

  • lcdelgado Profile Picture
    379 on at

    Date & time column

    lcdelgado_0-1690828488846.png

     

  • lcdelgado Profile Picture
    379 on at

    Is included on the screenshots 

  • wskinnermctc Profile Picture
    6,519 Moderator on at

    I made an example that is a little different than your original flow. The main this is that I have moved the date filtering directly into the the Get Items in the Filter Query field. This will filter on the column by dates that are less than or equal to today's date plus 30. This is pretty much the same as your original Filter Query 2, except it is in the Get Items and Filter Query format.

     

    The second difference is using an Array Variable to hold the email addresses. It does the same thing you did with combining using Union() expression, but it does it in the same variable which is then used as the source for Apply to Each 2.

     

    So basically the flow is:

    1. Get Items (filtered by only the relevant dates)
    2. Initialize an Array Variable
    3. Apply to Each value from Get Items
      1. Append the Email value to the Array Variable
    4. Union() the Array Variable to remove duplicates
    5. Reset the Array Variable to the previous Union() so it now only holds unique emails.
    6. Apply to Each 2 - using the Array Variable as the source
      • Filter Array the Get Items so that the Email value is equal to the current Array value
      • Select the Filter Array and put the values into rows
      • Create HTML Table using the Select output
      • Send an Email using the HTML Table in the body

    Here is an outline example flow:

    Example Flow OutlineExample Flow Outline

     

    Here are the individual steps for the flow:

    FlowDetail1FlowDetail1FlowDetail2FlowDetail2FlowDetail3FlowDetail3

     

    There are some steps where you will use different column titles from your SharePoint list. Like in the filter query, you need to use the internal sharepoint column name. My column was "BatteryExpirationDate" but your column will probably be "Battery_x0020_Expiration_x0020_D" so you will need to use that.

    The same goes for in the Select action and the item()?['ColumnName'] for whatever data you want to include.

    In my select action I used item()?['BatteryExpirationDate'] but you will probably use item()?['Battery_x0020_Expiration_x0020_D'] for the values.

     

    Hope this helps!

  • lcdelgado Profile Picture
    379 on at

    Well Im going to recreate your option I will let you know! Appreciate your help😊

  • lcdelgado Profile Picture
    379 on at

    Well its seems like I have another problem:

    lcdelgado_0-1690908754986.png

     

  • lcdelgado Profile Picture
    379 on at

    well, I fixed but something looks weird on the flow :

    lcdelgado_0-1690916583151.png

     

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 432

#2
11manish Profile Picture

11manish 313 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 154

Last 30 days Overall leaderboard