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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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
Resident Rockstar
Resident Rockstar

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. 

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,490)