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 / Filter Array issues in...
Power Automate
Suggested Answer

Filter Array issues in workflow

(1) ShareShare
ReportReport
Posted on by 44

I’m working with Power Automate and encountering an issue with checking for existing values in an Excel table. Here’s the scenario:

  1. Microsoft Form Submission: A user submits a Microsoft Form where one field is the Beneficiary Number with the format (e.g., BDS/AN/ASP/1.2.3.4/2024/001).

  2. Saving Data: The submitted Beneficiary Number is saved into an Excel table named xyz on a specific sheet.

  3. Checking for Existing Numbers: When a subsequent user submits the form, I need to check if the newly entered Beneficiary Number already exists in the xyz table.

  4. Current Approach: I am using the Filter array action to perform this check, but the result returned is an empty array ([]), indicating that no matching records are found.

Here are the details of my setup:

  • Excel Table: The table xyz contains a column for Beneficiary Numbers.
  •  
  • Filter Array Expression: I’m using a filter expression in Power Automate to compare the form entry against the Excel table’s Beneficiary Number column.
  • Expreshion like @equals(item()?['BeneficiaryNumber'], Varible('Enteredbeneficiary number')
          1st parameter =  item()?['BeneficiaryNumber'] = List rows present in table
           
 

My question is:

What could be causing the Filter array action to return an empty result, and how can I resolve this issue? Are there common pitfalls or mistakes that could lead to this problem, such as data type mismatches, formatting issues, or incorrect filter expressions?

Any guidance or suggestions would be greatly appreciated!

 

Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at
    Hi,
     
    You don't necessarily need a filter array because it is built into the List Rows Present In A Table Action itself.  The left part of the filter is the Excel column name and it will equal (eq) the dynamic content from the form question.  Make sure to put the dynamic content inside apostrophes, shown below.
     
     
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
     
  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at
    Carefully examine the raw outputs of the form details action. You might find leading or trailing whitespace or a trailing /r/n or /n line break. If so you'll need to wrap the response in a trim() function and/or a replace() function to get rid of the line break.

    Also, it could be worth wrapping toLower() around the expression on each side of your Filter array action.
  • swgsit Profile Picture
    44 on at
     
    i have changed the filter query 
     
    equals(string(trim(tolower(item()?['BeneficiaryNumber']))),string(trim(toLower(variables('EnteredProjectNumber')))))'
     
    Error Message after executing 
     

    InvalidTemplate
    The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@equals(string(trim(tolower(item()?['BeneficiaryNumber']))),string(trim(toLower(variables('EnteredProjectNumber')))))' failed: 'The template language function 'tolower' expects its parameter to be a string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#toLower for usage details.'.
     
     
     
    but result shows an error shows in bellow image. but cannot figure out where comes the null values. 
     
    my filter value input comes from the Select Varible 
     
  • swgsit Profile Picture
    44 on at
    @trice602  This wont work  i am still struggle this issue can some one have idea about the issue
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at
    Hey there!
     
    I am following up on this post filter array issues in workflow in this category general discussion from 09/02/2024.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 4 replies and 1 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard