Hi all,
Hoping this will be a very simple fix for somebody more experienced than me.
I am creating a report using a flow, but need to filter the entries in my spreadsheet based on 2 conditions.
I currently am listing rows in a table (with no filter) and then using the filter array action to filter the entries. I just cannot work out the syntax / formula required in advance mode to make the 2 conditions work.
I am aiming to filter the entries based on the below conditions:
Column "Age of Non-Complete Entry" is greater than 13
Column "Reported to user" does not equal "Yes"
Is anybody able to assist?
Hello @Gwill1983
Why do you try to convert "Reported to user" to integer? As far as I read in the last posts the value is a string (like "Yes"). If you provide the information of what should happen when the value is null, I can send you a condition that will work.
Hi. This is still failing.
Coming up with this error:
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@And( not(equals(empty(item()?['Age of Non-Complete Entry']), true)), greater(int(item()?['Age of Non-Complete Entry']), 13), not(equals(int(item()?['Reported to user']), 'Yes')) ) ' failed: 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
I thought this would be such an easy thing to setup, but it is ruining me! 🙂
Given the ages can be blank, you would need to check for that first, then the other conditions. You should be able to just copy/paste the below.
@And(
not(equals(empty(item()?['Age of Non-Complete Entry']), true)),
greater(int(item()?['Age of Non-Complete Entry']), 13),
not(equals(item()?['Reported to user'], 'Yes'))
)
You don’t have to. What should happen when the age is null? Just add the coalesce function and put in the value it should be when no age is available.
Hi.
The values are below. This column does include null values
Hi.
Neither of those are working.
he execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@and(
greater(float(item()?['Age of Non-Complete Entry']), 13.0),
not(equals(item()?['Reported to user'], 'Yes'))
)' failed: 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
Can you try the following expressions to see if either of them work as expected.
@And(
greater(int(item()?['Age of Non-Complete Entry']), 13),
not(equals(item()?['Reported to user'], 'Yes'))
)
//OR
@and(
greater(float(item()?['Age of Non-Complete Entry']), 13.0),
not(equals(item()?['Reported to user'], 'Yes'))
)
What are the values in field „Age of Non-Complete Entry“ and is it possible that there are null values too?
If you don’t know what I mean, use the select action to select only the field „Age of Non-Complete Entry“ and put in the output of it here.
Thanks for your suggestions. Unfortunately, both of these are failing!
The first option shows the error below in the filter array:
InvalidTemplate. The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@And( greater(item()?['Age of Non-Complete Entry'], 13), not(equals(item()?['Reported to user'], 'Yes')) )' failed: 'The template language function 'greater' expects two parameter of matching types. The function was invoked with values of type 'String' and 'Integer' that do not match.'.
The second option fails showing the error below:
InvalidTemplate. The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@And( greater(float(item()?['Age of Non-Complete Entry']), 13), not(equals(item()?['Reported to user'], 'Yes')) )' failed: 'The template language function 'float' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
Any ideas on what to check that could be causing these to fail?
However, if your Age of Non-Complete Entry is being returned as a string, you may need to convert it to a number first.
@And(
greater(float(item()?['Age of Non-Complete Entry']), 13),
not(equals(item()?['Reported to user'], 'Yes'))
)
----------------------------------------------------------------------
If I've answered your question, please mark the post as Solved.
If you like my response, please consider giving it a Thumbs Up.
You can try the following:
@And(
Helpful resources
News and Announcements
Welcome to the Power Platform Communities - Lets Get Started!
May 14th | Power Platform Community AMA: Power Apps Edition
Quick Links
Leaderboard > Power Automate - Building Flows
#1
stampcoin
97
#2
Michael E. Gernaey
70
Super User 2025 Season 1
#3
David_MA
48
Super User 2025 Season 1
Overall leaderboard
Featured topics
Start and wait for an approval action
Product updates
Microsoft Power Platform Community release plans