isPropertyEmpty: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added version.)
Line 1: Line 1:
{{MacroFunction
{{MacroFunction
|name=isPropertyEmpty
|name=isPropertyEmpty
|version=1.3b48
|description=
|description=
Returns 1 if the [[Token:token property|token property]] for the [[Token:Current Token|Current Token]] is empty. A [[Token:token property|token property]] is empty if it is null, if an empty string ("") has been assigned to it, it is not considered empty.
Returns 1 if the [[Token:token property|token property]] for the [[Token:Current Token|Current Token]] is empty. A [[Token:token property|token property]] is empty if it is null, if an empty string ("") has been assigned to it, it is not considered empty.
Line 6: Line 7:
|usage=
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: empty = isPropertyEmpty("propertyName")]
isPropertyEmpty("propertyName")
</source>
</source>



Revision as of 12:22, 10 March 2009

isPropertyEmpty() Function

Introduced in version 1.3b48
Returns 1 if the token property for the Current Token is empty. A token property is empty if it is null, if an empty string ("") has been assigned to it, it is not considered empty.

Usage

isPropertyEmpty("propertyName")

Example

[r, if(isPropertyEmpty("propertyName")): propertyName = someDefaultValue]