Skip to main content
Nintex Community Menu Bar

Is Empty DOESN'T Work. 

 

Any Ideas?

Hi

Which environment, and, can you post a screenshot of how you've configured this? Calculated field or rule?

Should be isNullOrEmpty({field}) I think! But let's see - maybe something is afoot!

Cheers,

Rhia


Hi Stephan,

            You can simply add a validation rule to your field in the Nintex Form.To make it even more simple you can just add a set for validation setting in the configure action as shown below.

Regards

Bashya Rajan


Stephan mentioned he is looking to check if something is empty, not necessarily for validation purposes. This may work if it is for validation, but otherwise, another path is best.


I don't think this will work--but I'll try it.  Trying a condition with "is empty" didn't.


It's more complex than this.  This field isn't required but I need to know if it's empty.  If it's filled I create list items for a dependent list and then clear it out and update a status field (read only) which then contains the last two status items by date.


There is no isNullOrEmpty({field})


Here is the simplest approach.

I’ve added two fields to a custom list: Details (multi-line text input) and Status (choice field in Display Mode). A workflow will run on each item and update Status to Empty or Not Empty depending on the field value. A condition is used to determine how the list should be updated.

.

The condition is configured using the “is empty” condition.

Once the workflow runs, the Statuses have been updated accordingly. In your case, you’d use the branches to create your list items and update the required fields.


Thanks, doesn't work for me. Is Empty doesn't work on Multi-line text fields in my environment.


are you sure the field is really empty? doesn't it contain eg. space(s).

'is empty' check should normally work. I've tried it with both plaintext and reach text, works for both for me.

if it really doesn't work for you, you can check for emptiness with regular expression.


How about an enhanced field?


Does NOT work for me.

I clear the column after using by setting to a blank multiline variable:

Variable Declaration:

SharePoint Definition:


you seem to hit a bug  

you will have to add one another regex that will clear those markups or customize it to search for text within markups


Hi Frank!

The first question is: Which kind of multiple line of text are you using? Plain text, Rich text, or Enhanced rich text?

My solution is to use a plain text field, then create a multiple line of text variable in the workflow and then "check if the variable is empty". This works for me.

If you are using e.g. Rich text I think the field is surrounded by some html tag. Here my approach would be: Define another empty field and check if those fields are equal. Works for dates as well!


Late to the party and hating Nintex at this point, but here's how I solved it:



 





  1. Set a text variable equal to the multi-line field (can be a single or multi-line variable, doesn't seem to matter)


  2. Strip all the XML tags and whitespace characters with a regular expression replace (pattern = "(<[^<>]+>|&#160;|s+)"). Overwrite the variable with the replacement results.


  3. Use the "Set a Condition" task to check for the Inline Function fn-Length "not equals" 0.




 



Basically, through painstaking effort, I discovered that any searches of the original multi-line field will include all of the hidden XML tags that are associated with the field. So, even if you have nothing but carriage return characters in the cell, a regular expression search for letters ([a-z]) will return TRUE because it'll find the <p>, <div>, and <br> tags! And you don't see those tags through any editing medium in the list. God **bleep** obnoxious.



 



If you try to send emails to yourself with the contents of the field to see what's triggering the regex, the tags will all be interpreted/hidden somewhere between Nintex and your email client. You have to print the contents using the Inline fn-XmlEncode/fn-XmlDecode functions.



 



Edit: For anyone unfamiliar (or anyone who struggles) with regular expressions, a color-coded breakdown of the regex-stripping pattern is below.



 




Reply