cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How to set a person or group field to empty in Nintex Workflow

Hi,

I cant get this to work properly. I have a person or group field on a list and at the end of the workflow, I want to clear the field. I'm using the 'Set Field in Current Item' action currently to set the field to a blank variable. This seems to only partially remove the user entity from the field though as the edit form is broken for the specific item when the workflow has ran. I can also see on the display form that the field still contains some information. Any help on how to do this would be appreciated.

Thanks

Labels: (1)
Tags (1)
Reply
21 Replies
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

Try setting it to the value of a space character. Just hit the space bar once within the set field action. Let me know if you still have issues.

Accept as Solution Reply
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

Thanks - just tested this though and get an error on publishing the workflow. I've confirmed that it doesn't like setting the value as a space within the set field action by testing with only that action in the workflow.

"Error publishing workflow. Workflow XAML failed validation due to the following errors: The private implementation of activity '1: DynamicActivity' has the following validation error: Value for a required activity argument 'Operand' was not supplied. HTTP headers received from the server - ActivityId: 34d64f90-d825-44cd-abee-421efb244424. NodeId: . Scope: . Client ActivityId : cf09509d-6069-2000-0d0b-d7f608582633. The remote server returned an error: (400) Bad Request."

Accept as Solution Reply
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

yes, the validation doesn't seem to understand how to save this or that it knows this is invalid. Save a space value into a Single Line of Text variable and use its value to set the Person field.

Accept as Solution Reply
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

Thanks, but surprisingly I still get the same error when publishing if I use a variable with space in it. I'll work around this for now by not using a person or group field, but think Nintex need to add a simpler way of doing this! 

Accept as Solution Reply
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

So I did some searching and found that this is a very common occurrence for SharePoint 2010 and 2013 workflows for this field type. That is why Nintex is also affected. One solution was to create a Single Line of Text string as an initiation variable and not set it's default value and not provide one when the workflow starts. Then use this workflow variable as a null string throughout the workflow.

I tried this in my online tenant and I was now able to publish the workflow, but the process didn't seem to work. It may on premise, can you try this? Also, if this is the case, I wonder if turning of validation then running the workflow is all that is needed.

Accept as Solution Reply
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

Yes, that may be the case. Unfortunately though, I don't have access to an on premise environment to check. It looks like there is currently no way to do this with NWF online.

Thanks for looking in to it Andrew.

Accept as Solution Reply
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

Don't give up. We haven't tried everything i'm sure.

Accept as Solution Reply
Not applicable

Re: How to set a person or group field to empty in Nintex Workflow

Hi,

I came across this issue and resolved using a very odd way. I made a variable of person type and kept it empty. Then I simply passed this variable as the value to be set in set field value action. This worked for me. I think it should work for you as well.

Keep us posted. All the best.

Accept as Solution Reply
Workflow Hero

Re: How to set a person or group field to empty in Nintex Workflow

Hi,

I tried this previously, but couldn't get it to work. Is your workflow for the 365 version of NW? If I create a variable of person type, it forces it to be a initialization variable and requires the user to enter the value before the workflow runs. If I use an action to set it to blank, the workflow runs, but I seem to get the same problem of the field not being fully cleared. It may be something to do with the way I'm configuring it!

Accept as Solution Reply