cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kgreen8790
Advocate II
Advocate II

Filter Array simply not returning any value even though match shows in input

I'm really stumped on this one guys. I've done dozens of google searches and poured through the forums here but somehow I have come up short. It seems like a really simple task. Just filter an array from the results on an excel connector output but I have not been able to make it happen.

 

My flow goes like this. PVA gets input from user. PVA calls an action and passes user input into the flow. The flow gets the user's manager and list rows present in a table where users manager matches managers from the excel spreadsheet using oData filter. The flow then tries to filter the output of the excel functions value to only the items where user input (matching column) equals "4". This is where it all breaks down. I'm getting input in the filter array function that clearly shows the user's input (PACOM) has a value of "4" but the output from filter array is empty. I've tried setting the 4 as a string, an int, a float. Nothing seems to matter. I'm completely stuck on this. Any help would be greatly appreciated. TIAshows valid input where "PACOM" has value "4"shows valid input where "PACOM" has value "4"shows valid input where user input Equip_Type equals PACOMshows valid input where user input Equip_Type equals PACOMtrue value 4 attempttrue value 4 attempt4 as string attempt4 as string attempt

1 ACCEPTED SOLUTION

Accepted Solutions
kgreen8790
Advocate II
Advocate II

Ok, I do feel rather silly now. I have found my mistake. On the filter array function you cannot simply name the key that you are looking to compare values on you must wrap it in the item expression in order to get the function to recognize that what your looking for is an item within the array. So simple and now I feel so stupid for missing that! Here's the expression that worked:

 

 

item()?[triggerBody()['text_1']]

 

 

 

Here's a link to the blog that made me realize my mistake:

Filter an array or collection in Microsoft Flow (sharepains.com)

 

Thanks to everyone who gave this a look!

debug1.PNG

View solution in original post

1 REPLY 1
kgreen8790
Advocate II
Advocate II

Ok, I do feel rather silly now. I have found my mistake. On the filter array function you cannot simply name the key that you are looking to compare values on you must wrap it in the item expression in order to get the function to recognize that what your looking for is an item within the array. So simple and now I feel so stupid for missing that! Here's the expression that worked:

 

 

item()?[triggerBody()['text_1']]

 

 

 

Here's a link to the blog that made me realize my mistake:

Filter an array or collection in Microsoft Flow (sharepains.com)

 

Thanks to everyone who gave this a look!

debug1.PNG

Helpful resources

Announcements
Power Virtual Agents News & Announcements

Power Virtual Agents News & Announcements

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

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Virtual Agents Community Blog

Power Virtual Agents Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,739)