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.
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.
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?
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.
You can build a null check expression in the claims mapping.
if(equals(variables('Accessuser'), null), null,variables('Accessuser'))
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
This seems to be a limitation of Update Item action that you can not pass empty or null value. Refer following thread.
You can use REST API call to update the item where you can implement null check.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.