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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to check empty out...
Power Automate
Unanswered

How to check empty output from Select Action

(1) ShareShare
ReportReport
Posted on by

Hi

I've a SharePoint List where it contains items.

I used the Get Items in order to pull some data from my SharePoint list and I use OData Filter to select specific records.

After that, I use Select in order to select specific items from the output in the previous step.

 

Now, I wish to put a condition that will check whether the output is empty or not.

My flow is below

 

 

yjamous_0-1628802603839.png

 

Categories:
I have the same question (0)
  • Mitanshu Profile Picture
    1,650 Moderator on at

    Select action will give you an array.

    You can use expression length(ARRAY)  to get number of elements in an array.

     

    So in this case, use condition length(ARRAY) is equal to 0.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @Anonymous 

    Try one of these two ways. Assuming an array of interest is inside 'Compose 2' (but you can easily just use the body or body/value output of Get items instead in these expressions - whichever is appropriate for your case):

     

     

     

    empty(outputs('Compose_2'))

    is equal to

    true

     

    81221-emptrue.png

     

     

    or

     

     

    length(outputs('Compose_2'))

     

    is less than 1

    81221-len.png

     

    Replace the example of outputs('Compose_2') in the above with the output of Get Items. This would be something like either outputs('Get_Items')?['body'] or outputs('Get_Items')?['body/value'] - use what works correctly here for your use case.

  • Community Power Platform Member Profile Picture
    on at

    How can I find the name of the array that results from "Get Items" action?

     

  • Mitanshu Profile Picture
    1,650 Moderator on at

    @Anonymous wrote:

    How can I find the name of the array that results from "Get Items" action?


    outputs('Get_items')?['body/value'] 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard