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.

View solution in original post

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.

View solution in original post

Helpful resources

Announcements
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,483)