web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Condition using length
Power Automate
Answered

Condition using length

(0) ShareShare
ReportReport
Posted on by 340

Hey guys,

 

I am trying to add a condition step based on the output of a filter array action. Basically there will be one of two outputs

 

When there is no output it will just be [ ]

da1ve_0-1690353947939.png

The other scenario is an output:

 

da1ve_1-1690354010797.png

So what I would like is that if the output is [ ] then the condition should send the flow to a Terminate action. If it is not [ ] and has some data then it should send the flow on to perform another action.

 

Thanks,
David

Categories:
  • Verified answer
    SanmeshG Profile Picture
    1,956 Moderator on at

    Hi @da1ve ,

     

    Please use the length function to calculate the length of the array that is returned after filter array action.

    length(body('Filter_array'))

     The condition if length(body('Filter_array')) is greater than 0 , then perform the set of action , else terminate the flow.

     

    If this helps , please mark this answer as solution.

     

    Thanks,

  • da1ve Profile Picture
    340 on at

    Champion! Thank you @SanmeshG 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 330

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 123

Last 30 days Overall leaderboard