cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Responsive Resident
Responsive Resident

Why is my Filter Array returning empty?

Really can't get my head around this, I have tried multiple things. 

 

Here is my array:

Array.png

 

It definitely 100% contains the number 8831

Here is my filter:

@equals(item(), 8831)

 

Here are the results:

filterArray.png

 

Why??

1 ACCEPTED SOLUTION

Accepted Solutions
SylvieLet17
Responsive Resident
Responsive Resident

Ok I think it might have been a bug?

I added single quotes in the basic mode editor, and then I checked it in advanced mode and it was adding double quotes inside the single quotes? and then when saving it would remove the single quotes again. 

Bizarre. I deleted and recreated the action and it seems to be working now. 

View solution in original post

8 REPLIES 8
ekarim2020
Super User
Super User

Your array is of type string, but your condition is using an integer for comparison.

Try the following:

@equals(item(), '8831')

Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.

JamesYumnam
Resolver III
Resolver III

Hi @SylvieLet17 

you have created a simple array and that too of String type ("11059","19198"...).. So, in the expression you need to put the value within quotes.

Personally, i think it would be much easier if you use a condition control.

JamesYumnam_0-1628253891525.png

 

Thanks Ellis, but this returned the same result

Thanks, I had tried this, as well as double quotes and neither worked

ekarim2020
Super User
Super User

This is what I tried, starting with an array variable:

ekarim2020_1-1628255343917.png

Result:

ekarim2020_0-1628255312322.png

And an array in a Compose action also worked with the same filter:

ekarim2020_0-1628256679865.png

Ellis

ekarim2020
Super User
Super User

Perhaps data item '8831' isn't in this array?

Can you scroll further down the data items and visually confirm that 8831 is there:

ekarim2020_0-1628261210121.png

Could you also try the condition with another array item such as  '11059' as that we know that this item is in the data set (we can see it!).

Ellis

SylvieLet17
Responsive Resident
Responsive Resident

2021-08-09 11_30_30-Run History _ Power Automate.png

SylvieLet17
Responsive Resident
Responsive Resident

Ok I think it might have been a bug?

I added single quotes in the basic mode editor, and then I checked it in advanced mode and it was adding double quotes inside the single quotes? and then when saving it would remove the single quotes again. 

Bizarre. I deleted and recreated the action and it seems to be working now. 

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (2,374)