Skip to main content

match_relation_meta

Synopsis

@match_relation_meta(MetadataKey LogicalExpression) -> Boolean

@match_relation_meta(MetadataKey InnerFunction) -> Boolean

Description

Checks if the object's relation metadata entry matches the provided condition.

info

Available in Contextal Platform 1.0 and later.

Parameters

The first argument is always the object's relation metadata key name, which is followed by a logical expression or an inner function regex/iregex/starts_with, if the key's value is of type String.

Return value

Boolean: true if the relation metadata key exists and its value matches the condition, false otherwise.

Examples

@match_relation_meta($compressed_size < 32768)
  • This matches an object, which has a relation metadata key compressed_size and its value is lower than 32kB.
object_type == "Text" && @has_parent(object_type == "RAR") &&
@match_relation_meta($is_encrypted == false)
  • This matches a Text object, which is inside a RAR object, and is not encrypted.