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

Pass empty value to Person field in SharePoint List

I am using a Form to collect data and then passing the results to a SharePoint list. The form is used for user support and to gather multiple uses. If the responder says the ticket is for access, they see question 4 and can decide whether the access is for themself or someone else. The latter shows them question 5.

 

jsangerman_0-1631641715545.png

 

Because the input is variable, I am using a condition to populate a variable with the input to my SharePoint list. If the request is not for access, that variable (AccessUser) will have 0 length when passed to the SharePoint list. That is leading to an error:

 

The specified user could not be found.
clientRequestId: 10902738-6902-42f0-ad97-df5d054a2f76
serviceRequestId: 10902738-6902-42f0-ad97-df5d054a2f76

 

Here's a portion of the flow that I need to function properly. How can I conditionally pass no user ID to a person column in a SharePoint List?

 

jsangerman_2-1631642577014.png

I prefer not to use a Condition to have conditional Create Item actions. I'd prefer to use conditions to populate variables that are then passed through a single Create Item action.

4 REPLIES 4
PrasadAthalye
Super User
Super User

You can build a null check expression in the claims mapping. 

 

if(equals(variables('Accessuser'), null), null,variables('Accessuser'))
Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community
jsangerman
Frequent Visitor

I added that, but am still getting the same error.

 

It seems to not like a null value for a person. Which is strange because if I leave that column blank in the action, it works fine. So nothing = success but null = error

 

jsangerman_0-1632171913996.png

 

Here's the input to that action.

 

jsangerman_1-1632172070075.png

 

This seems to be a limitation of Update Item action that you can not pass empty or null value. Refer following thread.

https://powerusers.microsoft.com/t5/General-Power-Automate/How-to-clear-SharePoint-quot-Person-or-gr...

 

You can use REST API call to update the item where you can implement null check.

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,282)