How to 'Run if' current item field is empty/blank


Badge +3

I'm trying to create a workflow to remind users to fill in meta data, so If a list item field is empty (in this case a lookup field) then run something (send an email)

However the problem is when I select Run If -> Current Item -> Field A -> Equals -> value -> (leave value field empty) I cannot publish the workflow. The field I want to check against is a lookup field

chrome_2016-03-08_12-01-33.png

How do you get around this issue please?


20 replies

Userlevel 5
Badge +14

don't you have available an option 'is empty' instead of the 'equals'?

Badge +3

no, only 'equals' or 'not equals'

Userlevel 5
Badge +14

could you post screenshot where all the configurations of your run-if action are visible?

as well, what's your platform?

Badge +3

Hi there, the screenshot in the original post is all the 'Run If' configuration currently setup - I can't publish the workflow until I have a value in this field (see screenshot below:

chrome_2016-03-08_13-16-16.png

platform: Sharepoint online (365)

Userlevel 5
Badge +14

I meant whole dialog which's clip you attached in first post... happy.png

Badge +3

That is the whole dialog in first post (apart from menu bar) - please let me know if there's something specific you'd like to see?

Userlevel 5
Badge +14

I do not have access to O365, but in on-prem env. there is one more option above what you have posted

if you do have that available what other options you have in place of 'list lookup'?

Badge +3

I see what you mean now, here is my full window:

chrome_2016-03-08_14-19-23.png

options I have are:

  • value
  • workflow variables
  • list lookup
  • workflow context
Userlevel 5
Badge +14

so select value in the dropdown.

I think it will then allow you to check whether a current item's field is empty.

Badge +3

Same result - you cannot publish the workflow because there are fields that need data:

chrome_2016-03-08_14-43-54.png

results in:

chrome_2016-03-08_14-44-49.png

Userlevel 5
Badge +14

aren't you able to put a reference to current item's field (or a variable) to the box next to value in first row?

are you building list or site workflow?

Badge +3

It doesn't matter what's in the first box - if the second box is empty, the workflow won't publish...

I'm building a library workflow. Perhaps there is a better way? my goal is to send the modifier of a document a reminder after 3 days if they have not entered some metadata in a certain field or fields (ie the field is empty).

Userlevel 5
Badge +14

aren't you still able to select 'is empty' check instead of 'equals'?

what about to try following trick: let's create workflow variable and leave it's value empty. compare your field against that variable.

Badge +3

I don't have an 'is empty' option - perhaps it's a weakness of nintex for sharepoint online?

I tried to create an empty variable - but once again, it doesn't allow me to publish because you need something in the variable value field! I can't enter a space or anything as this would not match the blank field... doh!

Userlevel 5
Badge +14

looking to help 'is empty' is supported by O365 in run-if action. I'm not sure why aren't you provided with that option.

once again, were you able to put field reference for one value and variable for the other value?

something like this (Title is field name/reference, empty_wf_var is name of/reference to workflow variable):

if you are not able to set it up this way, I'm affraid I'm not able to help you.

Badge +7

Well - what you could do:

  1. you create a variable "varLookupValue" of type "text"
  2. then you add a "set workflow variable" action and assign the variable the value of the lookupfield
    ntx_runifempty_1.png
  3. in the "run if" action you then test if the value of the variable is not empty
    ntx_runifempty_2.png
Badge +3

This solution is ideal - thanks for your help!

Badge +2

You can create a blank variable (at least in my on-premise Nintex Workflow 2010, I'm not sure about 365):

  1. Create a text variable called Blank.
  2. Add a "Build string" action and set the Blank variable to "fn-Trim()". Nintex is happy with this because it looks like you're setting it to something, even though the something is an inline function that returns nothing.
  3. Then you can add your "Run if" action that checks if your lookup field is equal to your Blank variable.

I don't know why Nintex don't just allow you to check if something is blank directly without having to go to all this trouble!

Badge

Would be much simpler (and less steps!) if we could just choose 'Is Empty' on the List Field.  will submit an idea.

Badge
This worked!

Reply