Skip to main content

count_ancestors

Synopsis

@count_ancestors([Expression]) -> Integer

Description

Counts the number of ancestor objects; optionally those matching the provided logical expression.

info

Available in Contextal Platform 1.0 and later.

Parameters

If no arguments are provided, all ancestor objects will be counted. If a logical expression is provided, only ancestors matching the expression will be counted.

Return value

Integer: number of ancestor objects (meeting the criteria).

Examples

@count_ancestors() > 3
  • This matches all objects, which have more than 3 ancestors.