0

everything is in the title.

I have a lookup field set to optional and I need from my Workflow to test this field.

When you do not select any value, you have (none) in the interface but I cannot seem to be able to test it in the workflow

I have tried is empty but it does not work.

3
  • 1
    Strange. I just tested it with Is CurrentItem:LookUp is empty and it works (LookUp is name of my lookup field) Commented Sep 8, 2011 at 20:14
  • 1
    indeed the is empty works, I retest it again and it worked. Publishing issue I Guess thx anyway
    – SPointer
    Commented Sep 9, 2011 at 12:41
  • Good. I posted my comment as answer so you can mark it as answer if you think it was helpful. Commented Sep 9, 2011 at 12:46

6 Answers 6

2

If the lookup allows multiple values you can check if it is equal to {"results":null}, which is the JSON string that will be returned when the field is empty (for SharePoint 2013 at least).

1
  • +1 This works once the Current Item:lookup field is converted into string and then compared to {"results":null}.
    – fujiFX
    Commented Jul 7, 2017 at 0:07
1

I just tested it with Is CurrentItem:LookUp is empty and it works.

Note: LookUp is name of my test lookup field

2
  • 1
    No, I face same problem, Is CurrentItem:Lookup is empty does not work with me too!!!
    – user9208
    Commented Jun 29, 2012 at 17:39
  • 1
    Same here, I don't seem to get a consistent behavior with CurrentItem:Lookup is empty
    – Christophe
    Commented Mar 30, 2013 at 23:01
1

In SPD 2010 workflow to verify the lookup value is select or not using the following condition

Is CurrentItem:LookUp equals 0

0

The string value of a an empty lookup column is actualy "0;#". You need to test if the column is equal to this value.

0

In my case, the lookup field (City Lookup) is returning the Title of the item in the second list.

Steps to test for emptiness:

  1. Set a variable of type String to the Lookup Field
  2. Test the variable for emptiness like usual:

Test lookup field for emptiness

This is in a SPD2013 Workflow on SharePoint 2016.

0

In my case (SP Workflow 2013 engine), the lookup column provided only the option for comparing "equal to" and "not equal to", so there was no "is empty".

What I did was simply assign the lookup value to a workflow string variable and then check the workflow value for empty. There, the option was available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.