Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Action 'Filter_array' failed

(0) ShareShare
ReportReport
Posted on by

Hi 

I was creating a flow for sending an email alert for expired documents. During the test run, the flow shows error in the filter array - failed. Please help me to take a look at the screenshot below.

Mohammed_Is_0-1631242510938.png

Waiting for your reply on this error.

 

Thank You

 

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at
    Re: Action 'Filter_array' failed

    @Anonymous 

     

    Can you clarify which expression you are using?

     

    This is what I am suggesting:

    less(coalesce(item()?['ExpirationDate'], addDays(utcNow(), 1)), utcNow())

     

    If you are sure that the Expiration date is never null, then you need to check your expression for ExpirationDate.  Look back at your history, output, can you see that key name "ExpirationDate".  Is the spelling correct?  Have you got the path correct?  Without seeing your flow it is hard to comment exactly on the cause.

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

  • Community Power Platform Member Profile Picture
    on at
    Re: Action 'Filter_array' failed

    Thank you for the solution but still, it is showing an error. The Expiration date is not null. Please help me to clarify it.

     

    Error details below

    The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@less(item()?['ExpirationDate'], less(coalesce(item()?['ExpirationDate'], addDays(utcNow(), 1), utcNow())))' failed: 'The template language function 'less' expects two parameter of matching types. The function was invoked with '1' parameter(s).'.

     

    Thank You

  • Community Power Platform Member Profile Picture
    on at
    Re: Action 'Filter_array' failed

    Hi @DamoBird365 

     

    Thank you for the solution but still, it is showing an error. The Expiration date is not null. Please help me to clarify it.

     

    Error details below

    The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@less(item()?['ExpirationDate'], less(coalesce(item()?['ExpirationDate'], addDays(utcNow(), 1), utcNow())))' failed: 'The template language function 'less' expects two parameter of matching types. The function was invoked with '1' parameter(s).'.

     

    Thank You

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at
    Re: Action 'Filter_array' failed

    Hi @Anonymous 

     

    Did you expect ExpirationDate to be null?  You might need to handle that scenario with Coalesce which will return the first non null iem from the list.

     

    less(  coalesce( item()?['ExpirationDate'] , adddays(utcnow(),1) )   , utcnow())
     
    which is basically if expirydate is null use utcnow()+1
     
    Damien
     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
    Cheers,
    Damien


    P.S. take a look at my new blog here and like & subscribe to my YouTube Channel thanks 😉

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow