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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Action 'Filter_array' ...
Power Automate
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

 

Categories:
I have the same question (0)
  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    @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

    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

    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

    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 258 Super User 2025 Season 2

#2
trice602 Profile Picture

trice602 205 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 204 Most Valuable Professional

Last 30 days Overall leaderboard