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

【Seek Help】 How to create a condition basing on the number of rows found in the "List rows present in a table"?

Dear Experts, 

 

I am trying to create a condition control that is based on the number of rows found in the "List rows present in a table".

The expected condition is :IF the number of rows is greater than 5, then Yes. IF less or equal to 5, then No.

 

I tried using the "Length" expression but failed. Is there any way that we can achieve that condition action?

 

2019-11-13 10_11_15-Edit your flow _ Power Automate.png

 

Many thanks for your help in advance!

 

Best regards,

Tom

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: 【Seek Help】 How to create a condition basing on the number of rows found in the "List rows present in a table"?

@TomLu1231 

Hi there.  Try changing the values of the list rows to an array, and then doing your Length:

 

20191112a.PNG

 

The expression is 

length(array(body('List_rows_present_in_a_table')?['value'])) and you would replace the bold part with the output "Value" from your List rows step.  From there, you can run your condition on the Compose, right?
 
Keep us posted.
-Ed-
 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

 

 

View solution in original post

1 REPLY 1
Super User
Super User

Re: 【Seek Help】 How to create a condition basing on the number of rows found in the "List rows present in a table"?

@TomLu1231 

Hi there.  Try changing the values of the list rows to an array, and then doing your Length:

 

20191112a.PNG

 

The expression is 

length(array(body('List_rows_present_in_a_table')?['value'])) and you would replace the bold part with the output "Value" from your List rows step.  From there, you can run your condition on the Compose, right?
 
Keep us posted.
-Ed-
 

If you liked this reply, please give it a thumbs up! If this reply has answered your question or resolved your challenge, please consider marking it as a Solution. This helps other users find it more easily via search.

 

 

View solution in original post

Helpful resources

Announcements
firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

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 Solution Authors
Top Kudoed Authors
Users online (4,789)