cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DMum
Advocate II
Advocate II

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
v-bacao-msft
Community Support
Community Support

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
Brad_Groux
Super User II
Super User II

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!

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

v-bacao-msft
Community Support
Community Support

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

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

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (18,481)