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

SharePoint people field returns null

Hello,

 

From a SharePoint task list, I am testing the field 'AssignedTo' for null.

 

But actually my condition @empty(triggerBody()?['AssignedTo']?['DisplayName']) is always true, even when tasks have a clearly identified Assigned to value.

 

Is there a way to test if the Assigned to field is empty that works?

 

Thanks beforehand -

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: SharePoint people field returns null

Hi @francoisperlade,

 

Could you please share a screenshot of your flow's configuration?

Further, do you want to check if the AssignedTo field of a SharePoint task list is empty?

 

I think there is something error with the formula that you provided within Condition box, the result that the "AssignedTo" field returned is an object array, there is no DisplayName property existed in the array directly, the DisplayName property only existed in the object item of the array:10.JPG

You could consider take a try to check if the DisplayName property of first object item of the array with the following formula:

@empty(triggerBody()?['AssignedTo'][0]?['DisplayName'])

 

If you want to check if the AssignedTo field is empty, you could consider take a try with the following workaround:

  • Add a "When an item is created" trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
  • @empty(triggerBody()?['AssignedTo'])
    Within "If/yes" branch of Condition, add a "Send me an email notification" action.

Image reference:11.JPG

The flow works successfully as below:12.JPG

 

 

More details about how to check if a field is blank, please check the following article:

https://powerusers.microsoft.com/t5/Microsoft-Flow-Knowledge-Base/How-to-check-if-a-field-is-blank/t...

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: SharePoint people field returns null

Hi @francoisperlade,

 

Could you please share a screenshot of your flow's configuration?

Further, do you want to check if the AssignedTo field of a SharePoint task list is empty?

 

I think there is something error with the formula that you provided within Condition box, the result that the "AssignedTo" field returned is an object array, there is no DisplayName property existed in the array directly, the DisplayName property only existed in the object item of the array:10.JPG

You could consider take a try to check if the DisplayName property of first object item of the array with the following formula:

@empty(triggerBody()?['AssignedTo'][0]?['DisplayName'])

 

If you want to check if the AssignedTo field is empty, you could consider take a try with the following workaround:

  • Add a "When an item is created" trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
  • @empty(triggerBody()?['AssignedTo'])
    Within "If/yes" branch of Condition, add a "Send me an email notification" action.

Image reference:11.JPG

The flow works successfully as below:12.JPG

 

 

More details about how to check if a field is blank, please check the following article:

https://powerusers.microsoft.com/t5/Microsoft-Flow-Knowledge-Base/How-to-check-if-a-field-is-blank/t...

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 50 members 4,771 guests
Please welcome our newest community members: