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

Community site session details

Session Id : 5PewKQiUGEUFPQBc33Pq7R
Power Automate - General Discussion
Answered

Condition using length

Like (0) ShareShare
ReportReport
Posted on 26 Jul 2023 06:48:10 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

I have the same question (0)
  • da1ve Profile Picture
    340 on 26 Jul 2023 at 07:01:36
    Re: Condition using length

    Champion! Thank you @SanmeshG 

  • Verified answer
    SanmeshG Profile Picture
    1,947 Moderator on 26 Jul 2023 at 06:57:26
    Re: Condition using length

    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,

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 626 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 374 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 284 Most Valuable Professional

Last 30 days Overall leaderboard