cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Field Value - clear field not working


I have a workflow where I am trying to use the Set Field Value action to clear a field but for some reason it's not working. The workflow doesn't error but it doesn't clear the field for some reason. I even have a Commit Pending Change after it. Has anyone else run into this?

10-31-2014 10-07-10 AM.jpg

Labels: (1)
0 Kudos
Reply
15 Replies
Nintex Employee
Nintex Employee

Re: Update Item - clear field not working


Hi Sheila,

try creating a variable, but don't put anything into the variable.

Then in the Set Field Value or Update Item action, insert your empty variable into the value section.

cheers,

Vadim

0 Kudos
Reply
Not applicable

Re: Set Field Value - clear field not working

Nope, that didn't work. I don't understand why this isn't working.

0 Kudos
Reply
Not applicable

Re: Set Field Value - clear field not working

What field type is it?

0 Kudos
Reply
Not applicable

Re: Set Field Value - clear field not working

It's just a simple text box.

0 Kudos
Reply
Not applicable

Re: Set Field Value - clear field not working

I just tried it on a test list and it worked without a problem. I also set the field to "Required", still worked. Enabled content type, set the field to "Hidden", still worked...

Does it work if you "overwrite" with something else than empty?

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Set Field Value - clear field not working

Hi Sheila,

I created a new list, added a field called Country (Single line of text).  I then create an item and set the value for that field to USA.

FirstImage.png

Next, I created a workflow and all it has is a Set Field Value action with the Country field selected and the value left blank.

SetFieldValue.png

When I ran this workflow, it cleared it out.

SecondImage.png

Can you try a new workflow on that list with just the Set Field Value action and see if that works?

If it does, this suggests that maybe in your other workflow, it's not getting to this action.

cheers,

Vadim

0 Kudos
Reply
Not applicable

Re: Set Field Value - clear field not working

Martin, I put in text and it took it. It's the clearing of the field that won't work. Thoughts?!

0 Kudos
Reply
Nintex Employee
Nintex Employee

Re: Set Field Value - clear field not working

I'd say, it'd be worth checking the SharePoint logs, to see if there's something logged there under Workflow Infrastructure that could explain this behavior.

0 Kudos
Reply
Not applicable

Re: Set Field Value - clear field not working

I see that your and my definition of a "simple text field" are completely different...

 

However, I just tested it with a form library and clearing a promoted field really doesn't work (I also tried "Update List Item" with the same result).

 

It does work if you use the "Update XML" action: In Infopath click the arrow on the right of your field name and select "Copy Xpath" in the context menu.

2014-10-31 16_31_52-Workflow Designer - Internet Explorer.png

Use this xpath in the "Update XML" action and select "Replace Node contents".

2014-10-31 16_32_34-Workflow Designer - Internet Explorer.png

I also noticed that clearing the field in Sharepoint manually does not work either: You have to open the Infopath form, clear the field and save the form, then it works. So probably this is "on purpose".

 

Regards,

Martin

0 Kudos
Reply