Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

How to make a Date as a condition in the Filter Array action

(0) ShareShare
ReportReport
Posted on by 160

I have 2 data in my excel sheet, [Alert Type] and [Date]. I am looking into how to make these 2 data into a condition in my "Filter Array" action in Power Automate. Below is the screenshot of my data from an excel sheet:

DelDev_0-1718691395595.png

 

The condition for [Alert Type] and [Date] for the "Filter Array" action I'm looking into is if ([Alert Type] is greater than Red4) AND ([Date] is equal to OR after the current date). I know how to make the [Alert Type] as a condition: 

    less(int(split(item()?['Alert Type'], 'Red')?[1]), int('4')) but I'm interested to know how to make the condition for if([Date] is equal to OR after the current date) and afterwards combine it with the condition of the [Alert Type] to if ([Alert Type] is greater than Red4) AND ([Date] is equal to OR after the current date). Any methods or techniques is appreciated, thanks in advance!
  • Re: How to make a Date as a condition in the Filter Array action

    Hi @Del-Dev ,

     

    As soon as you have turned on the ISO8601 in List rows in a table, there is no need to use addDays to convert serial number to ISO8601, please remove it.

     

    ——————————————————————————————————————————————————

    If my answer helps you solve the problem, please accept it as a solution.

    If you have another question, please post it in new post.😀

     

    Best regards,

    Rimmon

  • Del-Dev Profile Picture
    Del-Dev 160 on at
    Re: How to make a Date as a condition in the Filter Array action

    Hi @v-mengmli-msft,
    The Filter Array is working now, but I have an error for my "Select" action. Below is the screenshot of the error:

    DelDev_0-1718701849392.png

     

    And the below screenshot is my "Select" action:

    DelDev_2-1718702062547.png

     

  • Re: How to make a Date as a condition in the Filter Array action

    Hi @Del-Dev ,

     

    Please turn on this setting.

    vmengmlimsft_0-1718700755935.png

    Then use yyyy-MM-dd in filter array.

     

     

     

    Best regards,

    Rimmon

     

  • Del-Dev Profile Picture
    Del-Dev 160 on at
    Re: How to make a Date as a condition in the Filter Array action

    Hi @v-mengmli-msft,

    The screenshot below is the output of List rows in table:

    DelDev_0-1718699585211.png

    DelDev_1-1718699661825.png

     

    I have tried these formats that you have suggested earlier for the Filter Array:

     

    DelDev_4-1718699947154.png

     

    DelDev_3-1718699872078.png

     

  • Re: How to make a Date as a condition in the Filter Array action

    Hi @Del-Dev ,

     

    What does the output of Date column in List rows in a table?

    Please check if the format in Filter array is same to above.

     

    Best regards,

    Rimmon

  • Del-Dev Profile Picture
    Del-Dev 160 on at
    Re: How to make a Date as a condition in the Filter Array action

    Hi @v-mengmli-msft,

    Below is the screenshot of the format I have changed:

    DelDev_0-1718698581008.png

     

    The date 15-06-24 is still printed:

    DelDev_1-1718698703741.png

     

     

  • Re: How to make a Date as a condition in the Filter Array action

    Hi @Del-Dev ,

     

    This is because we are using different date formats.

    Your Date column is in dd-MM-yyyy format. Please modify date format in filter array.

    vmengmlimsft_0-1718698157365.png

     

     

    Best regards,

    Rimmon

  • Del-Dev Profile Picture
    Del-Dev 160 on at
    Re: How to make a Date as a condition in the Filter Array action

    Hi @v-mengmli-msft,

    Below are the screenshots:

     

    DelDev_5-1718697676020.png

     

    DelDev_6-1718697858335.png

     

     

    DelDev_2-1718697303510.png

    DelDev_4-1718697588979.png

     

  • Re: How to make a Date as a condition in the Filter Array action

    Hi @Del-Dev ,

     

    Could you please show some screenshots about your flow?

    Here is my test. I think it works well.

    The second item meets two conditions.

    1.less than red4 .

    2.greater than or equal to current date.

    vmengmlimsft_0-1718696200716.pngvmengmlimsft_1-1718696257670.png

     

     

    Best regards,

    Rimmon

  • Del-Dev Profile Picture
    Del-Dev 160 on at
    Re: How to make a Date as a condition in the Filter Array action

    Hi @v-mengmli-msft,

    Thank you for your suggestion! I have tried it but when I changed the date beside the "Red2" to "16-Jun-24", my expected outcome would be that I would not be able to print anything because both conditions: ([Alert Type] is less than Red4) AND ([Date] is equals to OR after the current date) and must be satisfied to print something. When I ran the flow in Power Automate, it still prints out something even I have changed the date to 16-Jun-24 and both conditions is not satisfied. Please advise me on this, thank you!

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,691

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 65,019

Leaderboard

Featured topics