cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Reading from a 'People or Group' field that is blank returns an error.

When reading from a people or group field in a SharePoint list, if the list item doesn't have a person or group picked then i get the following error when the flow runs:

 

Unable to process template language expressions in action 'Initialize_AssignedToDisplayName_variable' inputs at line '1' and column '2413': 'The template language expression 'string(triggerBody()?['Assigned_x0020_To']['DisplayName'])' cannot be evaluated because property 'DisplayName' cannot be selected. Please see https://aka.ms/logicexpressions for usage details.'.

 

I would expect that the field would return null or an empty string "" if nothing is in the field rather than an error. Is this behaviour by design or is it a bug?

 

Is there a workaround for this? Any attempt to read from the field seems to generate the error so i'm struggling to process any logic such as if field is blank then do something else. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Reading from a 'People or Group' field that is blank returns an error.

Hi @alexlush_severn,

 

I have made a test and the issue is confirmed on my side. The user @NailG has faced same issue with you, please check the response that I made within the following thread:

https://powerusers.microsoft.com/t5/Using-Flows/empty-person-group-column-results-in-error-of-update...

 

You could consider take a try to add a Condition to check if the People or Group type column is empty and use a variable to store the Person field value, if the Person column is empty, set null expression for this variable, if the Person column is not empty, set Approver DisplayName dynamic content for this variable. Then use the variable within your following steps. I have made a test on my side and please take a try with the following workaround:31.JPG

Within Condition box, type the following formula:

@empty(triggerBody()?['Approver'])

Note: The Approver column is a Person or Group type column in my SharePoint list.

 

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

3 REPLIES 3
Highlighted
Advocate II
Advocate II

Re: Reading from a 'People or Group' field that is blank returns an error.

I am also experiencing something similar. I have previously made a flow that sends emails and approvals to a group of people. If a person is blank for a particular SharePoint List record, it simply ignored the null value.

 

 ex1.jpg

However, as alexlush_severn describes, when I try the same thing in a new flow I'm developing I also get an error when trying to read from a person object with a null value.

ex2.jpg

 

Highlighted
Community Support
Community Support

Re: Reading from a 'People or Group' field that is blank returns an error.

Hi @alexlush_severn,

 

I have made a test and the issue is confirmed on my side. The user @NailG has faced same issue with you, please check the response that I made within the following thread:

https://powerusers.microsoft.com/t5/Using-Flows/empty-person-group-column-results-in-error-of-update...

 

You could consider take a try to add a Condition to check if the People or Group type column is empty and use a variable to store the Person field value, if the Person column is empty, set null expression for this variable, if the Person column is not empty, set Approver DisplayName dynamic content for this variable. Then use the variable within your following steps. I have made a test on my side and please take a try with the following workaround:31.JPG

Within Condition box, type the following formula:

@empty(triggerBody()?['Approver'])

Note: The Approver column is a Person or Group type column in my SharePoint list.

 

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

Highlighted
Frequent Visitor

Re: Reading from a 'People or Group' field that is blank returns an error.

Thanks @v-xida-msft, that workaround works great!!

I presume this is classed as a bug and is due to be fixed in future?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Top Solution Authors
Users online (6,514)