has_root
Synopsis
@has_root(Expression) -> Boolean
Description
Checks if the object has a root object matching the provided logical expression. The root object is the first one in the tree, from which other objects were eventually extracted. This function is similar to @has_ancestor()
, but is limited only to the root object.
info
Available in Contextal Platform 1.0 and later.
Parameters
A logical expression, which should match for the root object.
Return value
Boolean: true
if the root object satisfies the logical expression, false
otherwise.
Examples
object_type = "CAB" && @has_root(object_type == "CDFS" && size < 2097152)