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 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:
I have the same question (1)
  • 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

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

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard