cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MisterBean
New Member

Filter array

Hello Community,

 

I created a flow to update an Excel table depending on an ID (name DocID). The ID is a numeric.

I retrieve and transfer the data using a webhook, which contain a simple JSON body. In the next step I choose the action "List rows present in a table". Afterwards I try to compare and filter the ID getting from the webhook with the excisting IDs in the table. If the result ist empty, Excel should create a new row otherwise the excisting row should be updated. I also know that the returned IDs from Excel are in string format.

My filter array looks like that:

MisterBean_0-1646652021251.png

The expression of "value" is

MisterBean_1-1646652199973.png

And the comparison is

string(triggerBody()?['DocID']) is equal to  triggerBody(outputs('List rows present in a table')?['body'])
 
I submitted an excisting ID, so the flow should updated the Excel but instead a new row was created. The reason is that the returned array body is empty:
MisterBean_2-1646652774999.png

Thanks a lot.

2 REPLIES 2
abm
Super User
Super User

Hi @MisterBean 

 

If you looking to compare the ID then your below expression you currently using is not quite right.

 

triggerBody(outputs('List rows present in a table')?['body'])

 

This will return the whole list rows. If your excel Id column is called ID then you should try the below

 

item()?['ID']

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

Thanks a lot.

Unfortunately the problem still exist. And I found a second curiosity.

In the first picture you can see the data received by the webhook:

MisterBean_0-1646662859846.jpeg

Afterwards the flow didn't find the ID, which is not correct due to the "filter array" condition and create a new row, which is logical correct. But this row is empty. All entries are "null":

MisterBean_1-1646663100317.jpeg

But the should correspond to the data of the first picture.

This is the corresponding data assignment:

MisterBean_2-1646663210627.jpeg

 

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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!

Top Solution Authors
Top Kudoed Authors
Users online (4,644)