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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter Array action qu...
Power Automate
Unanswered

Filter Array action query failing

(0) ShareShare
ReportReport
Posted on by

I have a requirement in which I need to filter an array (list of direct reports of user) and the filter query must be dynamic ( there is a SharePoint list with all the parameters which needs to be included/excluded) , I tried developing this , but the dynamic query which I create is of the type string (has β€œβ€ )so it is failing in the filter array action , it’s not evaluating into Boolean value. How can I solve this issue ? . I can use variables to store the filter field and value but how can I manage the length of the query for ex if I have to filter users based on their specific job titles ( say contractors and managers) , how can I dynamically build a query incorporating both the conditions since the variable can hold only one job title and for adding another I have to create another query and 'AND' it with the first?

Is there a better way of developing dynamic queries to use in the filter array action?

 

error message - The execution of template action 'Filter_array_2' failed: The result '@and(equals(item()?['accountEnabled'],true),or(if(not(equals(item()?['jobTitle'], null)),not(contains(item()?['jobTitle'], 'Contractor')),true),if(not(equals(item()?['jobTitle'], null)),contains(item()?['jobTitle'], 'engineer'),true)),or(if(not(equals(item()?['country'], null)),contains(item()?['country'], 'India'),true),if(not(equals(item()?['country'], null)),contains(item()?['country'], 'US'),true)))' of the evaluation of 'query' action 'where' expression '@variables('TestQuery')' is not a valid boolean value.

Categories:
  • OPZ5 Profile Picture
    2 on at

    I'm experiencing this same exact issue 😞 

    Any solutions?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 315 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 267

#3
Henil Profile Picture

Henil 115

Last 30 days Overall leaderboard