empty is the Mendix equivalent of null ,so you would just need to check against that. E.g. $temp = empty
A string can also be zero length and not empty so you can against that as well. E.g. $temp = ‘’’ or $temp = empty
If you also want to discount whitespace, you can wrap the check for the zero length string with the trim function. E.g. trim($temp) = ‘’ or $temp = empty
If you have Community Commons installed, you can also use the rules IsEmptyString and IsNotEmptyString which wrap some of this up.
Hope this helps.
This is $String=empty working for me.
Usually I check in the decision for: $String = empty or $String = ‘’ .
This works for me, if it doesn't for you can you let us know what is going wrong/ what error you get?
Hope this helps!
For decisions like these, I generally use either $String=empty or $String=’’ , hope it works for you as well, as for the null part, in Mendix, empty is equivalent to null, so you can you can use $String=empty condition.
All the best!
To check whether the string value is empty or not, use below expression
$StringAttributeValue ! = empty and trim($StringAttributeValue) !=’’
$StringAttributeValue ! = empty – This will ensure that the string value is not empty
trim($StringAttributeValue) !=’’ – This will ensure that the string value is not having one or 2 character spaces
So if both conditions are satisfied, then above expression will return true which means String is NOT EMPTY. if any one of the condition is failing also then above expression will return false, then the string is EMPTY