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 / Error on filter array ...
Power Automate
Answered

Error on filter array Excel table

(0) ShareShare
ReportReport
Posted on by 566
On Excel table i need to filter an array based on these conditions below:
  • If Values on column C are not ending with "FR"
  • If there is no date on column N - "Date1"
  • If there is no date on column O - "Date2"
 
Please find here the screenshot of the code added on the "Filter array" element:
 
 
I get this error message when i trigger my flow:
 
The execution of template action 'Filter arrray' failed: The evaluation of 'query' action 'where' expression '@and( not(endswith(item()?['Item'], 'FR')), equals(item()?['DATE1'], ''), equals(item()?['DATE2'], '') )' failed: 'The template language function 'endswith' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#endswith for usage details.'.
What does this error means?
 
Do i need to change  my code above?
Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at
    @Sormick The error you are receiving is indicating that your conditions are checking for values that are Null. This means you need to filter any rows where the Item column doesn't have a value.
     
    In the meantime, you might be interested in these YT Tutorials:
     
    5 Common Flow Errors and How to Fix Them
    In this tutorial, I’ll cover 5 common flow errors and how to fix them. 

    1️⃣ Creating a filter query failed
    2️⃣ formatDateTime() function requires first parameter to be a string—got Null
    3️⃣ formatDateTime() function string must match ISO 8601
    4️⃣ Mis-match value types when comparing
    5️⃣ Value Cannot be Converted to the Target Type

    IN THIS VIDEO:
    ✓ How to fix common Power Automate errors that cause flows to fail
    ✓ Best practices for writing filter queries in SharePoint and Excel
    ✓ How to convert string to integer and decimal correctly using expressions
    ✓ The difference between int(), float(), and formatNumber() functions
    ✓ How to handle missing or null values in filter conditions
    ✓ Why formatDateTime fails—and how to pass a valid ISO 8601 value
    ✓ Preventing unnecessary flow runs with Terminate actions
    ✓ Pro tips for formatting and calculating values in Compose actions
    ✓ How to identify value types and debug expression issues fast
     
    ----
     

    In this video tutorial I’ll show you 3 practical ways to use the Filter Array action and how to use it properly.
    1️⃣ Cross-Referencing Data
    2️⃣ Filtering by Key
    3️⃣ Substring Matching
    Did you know that the Condition action has a limit of 10 conditions? Although it might look like the Filter Array action can only accept one condition—this is not true. By using the advanced mode you can enter multiple conditions into a Filter Array action with an expression.

    IN THIS VIDEO:
    ✓ 3 Ways to Use the Filter Array Action
    ✓ How to use the Scope Action to Group Actions
    ✓ How to Check the Number of Items returned from a Filter Array Action
    ✓ How to Cross-Reference Data in Excel with a SharePoint List
    ✓ How the Filter Array Action Works
    ✓ How to Access the Dynamic Content from a Filter Array Action
    ✓ How to Filter Items by a Key
    ✓ How to Filter Items by Matching a Substring
    ✓ How to Use Multiple Conditions in a Filter Array Action
     
     
    Hope this helps!
    Consider giving me a ❤️ if you liked my response!

    👉 Level up your Power Automate skills by checking out my tutorials on YouTube
    👉 Tips and Tricks on TikTok and Instagram
     
  • Srini007 Profile Picture
    3,327 Super User 2025 Season 2 on at
     
    Check that item()?['Item]  is returning the valid value, as the error says it is null
     

    (If this answers your question you can mark as Answered and give it a Like)

    Regards,
    Srini
  • Sormick Profile Picture
    566 on at
    Finally i noticed that i forgot some Parenthesis
     
     
    and(
    not(endswith(item()?['IT'],'FR'),
    equals(item()['EMD event'],''),
    equals(item()['EMI event'],'')))
     
    But now i have another message error:
    The execution of template action 'Filtrer_un_tableau' failed: The evaluation of 'query' action 'where' expression '@and( not(endswith(item()?['IT'],'FR'), equals(item()['EMD event'],''), equals(item()['EMI event'],'')))' failed: 'The template language function 'not' expects one parameter: the boolean value to negate. The function was invoked with '3' parameters
     
     
     

     
  • Verified answer
    Sormick Profile Picture
    566 on at
    Finally i found the issue!
     
    The "not" condition has been applied for the three conditions instead of one nstead of one.
     
    Here is the rectified code which works right now:
     
    and(
    not(endswith(item()?['IT'],'FR')),
    equals(item()['EMD event'],''),
    equals(item()['EMI event'],''))
    Thank you all for your support!

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
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard