cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
soooofunny
Helper II
Helper II

I don't know the cause of the Filter_array error

Hi, All.

 

I want to extract a person with the title "Manager" from the Office365 group.

 

For example...

Manager

General manager

Administrative Manager

 

It is configured like a capture, but I get an error.

a.PNG

The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@contains(item()?['jobTitle'], 'Manager')' failed: 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Null'.'.

 

I don't know the cause.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
efialttes
Super User
Super User

Hi!

I face the same limitation when using 'contains' operator in the past.

That is, if the field is empty in one of your records, condition evaluation will crash.

One potential workaround is to add an intermediate Filter Array just to remove those whose 'Job title' is null, then assign its output as your current filter array input

Flow_JobTitleNotNull.png

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

2 REPLIES 2
efialttes
Super User
Super User

Hi!

I face the same limitation when using 'contains' operator in the past.

That is, if the field is empty in one of your records, condition evaluation will crash.

One potential workaround is to add an intermediate Filter Array just to remove those whose 'Job title' is null, then assign its output as your current filter array input

Flow_JobTitleNotNull.png

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Hi.

 

Holy crap!I didn't know that at all.

After removing the nulls first, I searched and the error no longer occurs.

 

Thanks!!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,599)