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

how to check people/group empty

I wanted to check if the people/group column is empty or not (multiple people or group allowed in this group) . When I run the get items I see the column returned as [] however I am not able to check in the condition. The condition remained greyed out in the run time history. (Error?)

 

Thank you so much!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: how to check people/group empty

Hi @DMum ,

 

In fact, the array traversed by Apply to each is an empty array, So it cannot execute Condition contained in it.

This also confirms that the current value of the person field is empty.

 

If you want to check if the person/group field (Allow multiple selection) is empty, you could use length() function.

If the result of length() function is 0, then the value of this field is null.

Expression reference:

 

length(item()['Stage2Approvers'])

 

Image reference:16.PNG

 

Please take a try.

 

Best Regards,

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.

View solution in original post

4 REPLIES 4
Super User
Super User

Re: how to check people/group empty

I am guessing you are referencing the SharePoint connector and utilizing it for SharePoint Lists? If not, please respond with more details about your exact issue, like the connector you are using, and what you are trying to accomplish. A detailed screenshot of your Flow and any Flow errors would be helpful in our efforts to support you.

As far as working with conditions is concerned, please review the following relevent documentation:

To provide support for your condition, we'd need to see a screenshot of your Flow. From your short description, it sounds like you'd want to add a conditional loop after your Get Items, that would invoke a Get Item against a Flow Logical Expression comparing your desired column to being empty or not.

If you're looking to simply filter data based upon those values, you can accomplish that using OData. You can review the Filtering Data with OData blog post and the official documentation for OData Filtering within Flow for more details. 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

DMum
Level: Powered On

Re: how to check people/group empty

Hi Brad 

 

Thank you so much for your reply. Please see below.

12.PNG

 

Stage2Approvers is SharePoint Person/Group column (multiple values allowed). As you noticed my condition 2 is grayed out in the run history.. Please see below the code for the "Condition 2"

 

2.PNG

Community Support Team
Community Support Team

Re: how to check people/group empty

Hi @DMum ,

 

In fact, the array traversed by Apply to each is an empty array, So it cannot execute Condition contained in it.

This also confirms that the current value of the person field is empty.

 

If you want to check if the person/group field (Allow multiple selection) is empty, you could use length() function.

If the result of length() function is 0, then the value of this field is null.

Expression reference:

 

length(item()['Stage2Approvers'])

 

Image reference:16.PNG

 

Please take a try.

 

Best Regards,

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.

View solution in original post

Paul_McMillan
Level: Power Up

Re: how to check people/group empty

I would use the length() function in this case too.

Helpful resources

Announcements
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!

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 (5,348)