cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SylvieLet17
Continued Contributor
Continued Contributor

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
Continued Contributor
Continued Contributor

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
Continued Contributor
Continued Contributor

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

SylvieLet17
Continued Contributor
Continued Contributor

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 Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (2,832)