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.

  • 1
    Strange. I just tested it with Is CurrentItem:LookUp is empty and it works (LookUp is name of my lookup field) – Vedran Rasol Sep 8 '11 at 20:14
  • 1
    indeed the is empty works, I retest it again and it worked. Publishing issue I Guess thx anyway – SPointer Sep 9 '11 at 12:41
  • Good. I posted my comment as answer so you can mark it as answer if you think it was helpful. – Vedran Rasol Sep 9 '11 at 12:46
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 This works once the Current Item:lookup field is converted into string and then compared to {"results":null}. – fujiFX Jul 7 '17 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

  • 1
    No, I face same problem, Is CurrentItem:Lookup is empty does not work with me too!!! – user9208 Jun 29 '12 at 17:39
  • 1
    Same here, I don't seem to get a consistent behavior with CurrentItem:Lookup is empty – Christophe Mar 30 '13 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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