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

Nintex Workflow - Set a lookup column to null

I have a scenario where I want to set a lookup column to null from the workflow, as if the value was never selected.

Something equivalent to this PowerShell but in Nintex Workflow:

$item["ColumnName"] = $null

$item.update()

Thank you in advance

0 Kudos
Reply
14 Replies
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

setting value to zero should do the job

Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

Thank you Marian, but I actually tried this before posting the question and it is not working as 0 is not a valid value for a lookup and it gives an error when you open the form (The same as this one: https://community.nintex.com/message/45513?et=watches.email.thread#comment-45513)

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

then that might be as well some bug introduced with recent release(s).

it works in my env, but I'm not on the most recent release yet.

if you try to write value of lookup column which haven't had set any value yet to history log, does it provide some output/value?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

The workflow show nothing (empty string) in the log when logging the unselected lookup the same when logging the deleted lookup. But using PowerShell it will show you the saved value if it is deleted.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

one more idea - let's try to create workflow variable of type 'List item ID' and try to assign it to a list column that you want to clear.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

Marian, keep thinking (Y)

I actually tried this one as well yesterday and it gives an error "Coercion Failed: Unable to transform the input lookup data into the requested type."

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

By the way this is working for columns of type person.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

what about to try to feed it with ";#"  or "0;#" ?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Nintex Workflow - Set a lookup column to null

- Set it to empty string variable:

Workflow error: Coercion Failed: Unable to transform the input lookup data into the requested type.

- Set it to empty lookup ID variable:

Passed workflow, error on form: One or more field types are not installed properly. Go to the list settings page to delete these fields.

- Set it to empty lookup ID variable (with Return Type: Item Id):

Passed workflow, error on form: One or more field types are not installed properly. Go to the list settings page to delete these fields.

- Set it to a string variable with ;# as a value

Workflow error: Coercion Failed: Unable to transform the input lookup data into the requested type.

- Set it to a string variable with 0;# as a value

Passed Workflow, error on form: An unexpected error has occurred. (the same as https://community.nintex.com/message/45513?et=watches.email.thread#comment-45513)

- Set it to a number variable with 0 as a value

Passed Workflow, error on form: An unexpected error has occurred. (the same as https://community.nintex.com/message/45513?et=watches.email.thread#comment-45513)

- Set it to a number variable with -1 as a value

Passed workflow, error on form: One or more field types are not installed properly. Go to the list settings page to delete these fields.

- Set it to a person variable:

Workflow error: Coercion Failed: Unable to transform the input lookup data into the requested type.

- Set it to a List Lookup to the lookup list with a condition that should return nothing:

Passed Workflow, error on form: An unexpected error has occurred. (the same as https://community.nintex.com/message/45513?et=watches.email.thread#comment-45513)

- Set it to a List Lookup to the column itself (which is logging empty string in the history):

Passed Workflow, error on form: An unexpected error has occurred. (the same as https://community.nintex.com/message/45513?et=watches.email.thread#comment-45513)

Accept as Solution Reply