isPropertyEmpty: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Applied Template:MacroFunction)
Line 1: Line 1:
==Function isPropertyEmpty==
{{MacroFunction
 
|name=isPropertyEmpty
|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.


===Usage===
|usage=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[h: empty = isPropertyEmpty("propertyName")]
[h: empty = isPropertyEmpty("propertyName")]
</source>
</source>


===Examples===
|example=
<source lang="mtmacro" line>
<source lang="mtmacro" line>
[r, if(isPropertyEmpty("propertyName")): propertyName = someDefaultValue]
[r, if(isPropertyEmpty("propertyName")): propertyName = someDefaultValue]
</source>
</source>
}}
[[Category:Token Function]]

Revision as of 21:03, 8 March 2009

isPropertyEmpty() Function

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

[h: empty = isPropertyEmpty("propertyName")]

Example

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