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
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,222)