Skip to main content

has_parent

Synopsis

@has_parent(Expression) -> Boolean

Description

Checks if the object has a parent matching the provided logical expression.

info

Available in Contextal Platform 1.0 and later.

Parameters

A logical expression, which should match for the parent object.

Return value

Boolean: true if the parent object satisfies the logical expression, false otherwise.

Examples

object_type = "ZIP" && @has_parent(is_root() && object_type == "Email")
  • This matches ZIP objects attached to e-mails, if the Email is a root object (i.e. the e-mail itself was submitted to the platform for analysis)