How to remove lookup value in list column

  • 11 July 2015
  • 7 replies
  • 31 views

Badge +1

I am using Nintex Workflow for SharePoint 2010. I have a list column based on a lookup value. The column does not require a value to be set. I use a workflow to set the value of the column with no problem. I am now trying to REMOVE the value from the column but I can't figure out how to do it.

I've used the Set Field Value action with zero. I've set a List Item ID variable to NULL, I've even used an empty text variable, but I get one error or another.

Any ideas?

Thank you.


7 replies

Userlevel 6
Badge +16

In NW 2013 , using the Set Field Value action and a List Item ID variable, works

97414_pastedImage_0.png

Badge +1

If I set up the List Item ID variable and do not initialize it at all, I get the error "The workflow could not update the item, possibly because one or more columns for the item require a different type of information."

If I set the variable to zero, I get the same error.

If I set the variable to empty (by using a query list action that does not find anything), I get the same error.

so I am still left with the question of what VALUE should be in the List Item ID variable for this to work.

THANK YOU!!!

Badge +5

List Item ID should be using Integer. Anyway ‌, why do you need to set List Item ID to NULL or why do you  need to use List Item ID type variable?

Badge +1

I am trying to change the value of the lookup column to empty. The column has a value and I want my workflow to clear the value.

Badge +5

Hi Jim Blain,

Just couple of days ago I have implemented exact functionality that you are looking for, the approach I took somehow worked straight away. This is what I did in my implementation:

1. Create a dummy lookup column in the list with same settings as my actual look up field (I mean same list and column source)

2. In the item update action of workflow when I want to make it empty, assign dummy look up column to actual look up column and it did emptied without issues.

make sure you hide the dummy column from all the views and list forms so that no one accidentally enter something in it.

208649_pastedImage_1.png

I hope this approach helps you too.

Userlevel 5
Badge +14

setting lookup field to 0 (zero) should clear it up.

but try to do it rather with one of update item or update multiple items actions. set field value is not very reliable.

the error may as well be caused by an other field in the list if it is empty and in the meantime it became mandatory.

or if you have calculated column in the list and new calculated value do not fit anymore to possibly change column definition (eg. different data type).

Badge +3

For those who are still having issues with this, I tried the solutions mentioned above and it wasn't working for me. Then I realised that the lookup field that I was using was enforcing relationship behavior (cascade delete), that was why I couldn't set it's value to null. Luckily it was a case where I could disable the relationship and it all worked fine after that.

Reply