Code Type:
Code Scope of Action:
Code First Added:
Code Altered:
Boolean Comparison [other codes of this type]
item [codes with similar scope]
Already in v5.0.0
format"
DEPRECATED - use $Attribute short form Boolean test.
^exists( object )^
If the item object exists for current note, this condition inside a in ^if(condition)^ block statement is true, where object is one of the {parent, child, childLinks, basicLinks, inboundLinks, lastChild, next, previous, nextSibling, and prevSibling} item objects.
^exists( attribute )^
This condition is true if the attribute (represented here by attribute) exists for the note, and if it is:
- not zero, if the attribute is a number
- not empty, if the attribute is a string
- not black, if the attribute is a colour
…and it is always true if the attribute is a date.
But ^if(^exists(text))^ cannot be used to check if the note has some text content as text is not an attribute. Use ^if(text(this))^ instead.