cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
StephenM
Level: Powered On

error stopping flow when html table is blank

i want to stop my flow if the HTML table is blank.

 

i'm currently checking the length of the table and if thats 0 then it should stop, however it's not stopping. 

when i test it clearly shows the variable for length = 0 but the condition test length is not equal to 0 is still passing as true and it's proceeding.  i have tried using string and integer. both times the same. very odd. 

 

any ideas how i can stop the flow if the HTML table is effective empty?

 

thanks

len2.JPG

2 REPLIES 2
fermoreno
Level: Powered On

Re: error stopping flow when html table is blank

Hi Stephen,

 

I solved this in one of my flows using the following condition:empty html.PNG

I added the condition before creating the HTML Table. In my case is an output of select, then check with: "@empty(body('Select_2'))", if YES then stops, if Not, I continue creating the HTML Table.

 

Hope this helps you.

 

Fernando

@gmfer 

 

 

Community Support Team
Community Support Team

Re: error stopping flow when html table is blank

Hi @StephenM,

 

I did a test on my side and found that both length() and empty() functions are available.

This is my test, Filter Query is set in Get items, so no item can be obtained here.

Configure the output of Get items in Select, then configure it in the Create Html table, and use length() and empty() functions to observe the results:

50.PNG

Here's the result of the run, including using the length() and empty() functions, as below:

51.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (4,766)