Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

I need to filter further the array with due dates after Apply to each to every unique Client Name

(0) ShareShare
ReportReport
Posted on by 21

I have a flow. On a scheduled time at 6am GMT, the flow runs, it Gets items from a SharePoint List and sorts it by Client Name (CN) and Due Date (DD).  I am successful in even creating union so that each details per CN will be separate.

jophi1124_0-1665222211157.png

 

I get to do apply to each so that each scope will have only one instance of CN.

jophi1124_1-1665222404400.png

 

I want to insert a flow on the green portion about a field for Due date.  If a Client array has a due date in its array that is 7 days or below from date of flow, the next step is to check it's Client name if it has special characters.  If none, I need to automate sending email with subject that contains the word "RUSH" on it.  Likewise, if the CN does not have a due date field from its items that are within 7 days, the flow is to filter the client name as well and if none, send email as usual without appending RUSH on subject.  I cannot move on after the filter array.  I am not sure if i have put apply to each or Scope in error.

 

The content of Filter array is this: 

jophi1124_3-1665222913006.png

 

jophi1124_2-1665222868593.png

 

Also created array of Dates within 7 days from date of run  but can't put it into logic to check if the due date per client falls in one of the 8 dates.

jophi1124_4-1665223329549.png

 

Contents of the client entries contain these fields:

 "Title""This is the client name"
"field_Classification""text if entry is on or off"
"field_Due_x0020_Date""2022-10-20",  <--this is the Due date column from the SharePoint.
 
 
  • jophi1124 Profile Picture
    21 on at
    Re: I need to filter further the array with due dates after Apply to each to every unique Client Name

    Yes, this solved my issue!  Thanks for the insight.  I got confused with the Apply to each portion.

  • Verified answer
    Ellis Karim Profile Picture
    11,069 Super User 2025 Season 1 on at
    Re: I need to filter further the array with due dates after Apply to each to every unique Client Name

    Hi @jophi1124 ,

     

    Here are some suggestions for you to try.

     

    We use the Select action in Text Mode to select only the values in the Title column. 

    Snag_1f957b3d.png

    2021-12-11_10-10-19 (1).png

    And I think that the the expression in the Filter arraySS for the ClientName just needs to be: items('Apply_to_each')

     

    To check if the "field_Due_x0020_Date" appears in the ArrayDueDate you can use the contains operator. A rough approximation of usage could be:

    Snag_1f8ebd88.png

    Hope this helps.

     


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

     

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

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492