Macro Syntax to Filter by Meta Properties¶
Macro results can also be filtered by the meta
data of
a resource.
A typical resource instance has associated meta
data, for example:
meta: {
title: "Australia - AUS"
cached: true
tags: [0]
schema_version: "0.1.5"
summary: "true"
references: {...}-
actions: [...12]-
model_type: "data/Countries"
path: [2]
summary_attrs: [...3]-
business_key: {...}-
tagged_versions: [0]
}
The following macro fields are supported to filter by these properties:
__meta.business_key
__meta.model_type
__meta.schema_version
__meta.system_resource
__meta.tags
__meta.title_format
__meta.uri
__meta.version_tag
The macro fields can be combined with model attribute names in a comma separated, for example:
{# data.Countries.country_name,__meta.schema_version | country_name:Australia #}
Output:
[
{
"country_name": "Australia",
"__meta": {
"schema_version": "0.1.5"
}
}
]
As a further example: if the system_resource
is set in the meta
section of the resource, then the following macro can be used:
{# data.ConfigurationTemplate.name | __meta.system_resource: true #}
The output is all the Configuration Template names where it is a system resource:
[
"AddFeature_Attributes_View",
"AddFeature_DM",
"AddFeature_DOMM",
"AddFeature_DOMM_DM",
"AddFeature_PKG",
"AddFeature_PWF_Add",
"AddFeature_PWF_Add_DM",
"AddFeature_PWF_Del",
"AddFeature_PWF_Del_DM",
"AddFeature_PWF_Mod",
"AddFeature_PWF_Mod_DM",
"AddFeature_SelectModels_View",
"AddWizard_GuiRules"
]
For devices, the following are examples of macros that are available for the device NDL:
__device_meta.ndl.name
__device_meta.ndl.data/CallManager.pkid