Add a Blank token - Mendix Forum

Add a Blank token


Currently proper validation on empty strings can be done through the CommunityCommons module java action,
Can you please add a token that can be used instead? So that people stop using  trim($Entity/Attribute) != '' and $Entity/Attribute != empty

Also because the Rule cannot be combined with any other conditions in the same split.

I would much rather see splits like:

$Entity/Attribute1 = blank and 
$Entity/Attribute2 = 'Mendix is awesome'


*Modified this idea suggestion a little bit based on the feedback provided, 

[%EmptyString%] replaced with blank keyword, which basically would work similarly to current empty 

Reasoning behind going for the keyword blank:

- it will be easy to autocomplete, just like typing = empty, = b will autocomplete into = blank.
- blank keyword reflects the actual state of the variable, it's empty or has a blank value.

3 answers

I too would rather see a function that just gives me the boolean result of $Foo != empty and trim($Foo) != ‘’ (would save a lot of typing).


I see what you mean, but it seems rather obvious to me that a null string would be adequately represented by empty.


It is ambiguous what EmptyString means. Given that you see it as a replacement for trim(foo) != '' you probably meant BlankString.

I still think it is a good idea, but I would suggest an isBlank(foo) syntax (both in xPath and microflow expressions).