Dot notation

A dot-notation is used to refer to a macro function, model attribute, a defined variable, step reference, or non-attribute value in the model schema.

  • fn.macrofunction_name - identifies a macro function. Refer to the Macro Functions topics in the Advanced Configuration Guide.

  • self.attribute is used to refer to the current value of an attribute in the model where the macro applies.

    Here, attribute should be an attribute name of the calling model in which the macro is referenced (usually a configuration template). In other words, the macro should be associated with a configuration template of a resource that is referenced.

  • previous.attribute is used to the previously saved value of an attribute as opposed to the existing value in the case where a model is updated.

  • input.attribute identifies the values input via any of: the GUI, bulk load, provisioning workflow foreach variable or context.

  • pwf.variablename identifies a variable value defined as a provisioning workflow set step variable.

  • cft.attribute identifies the values input in a configuration template via the current value of the context_var of a foreach loop of a configuration template.

  • modelname.attribute - this notation defaults to the Data Model type.

  • modeltype.modelname.attribute is used for other non-data model types.

  • modeltype.modelname.attribute.NUMBER is used to refer to attribute NUMBER-1 where there is more than one attribute, that is, the first attribute reference is modeltype.modelname.attribute.0. See the Macro examples section. The NUMBER can also be a wild card, as in {# device.cucm.Phone.lines.line.*.dirn #}

  • macro.name is used to refer to a defined macro by name.

  • workflow.stepSTEPNUMBER.pkid - a hierarchy value to override the Context Hierarchy by specifying the context using the pkid of stepSTEPNUMBER, where STEPNUMBER can be 1, 2 and so on.

  • Non-attribute notation allows the following for a model:

    • __pkid
    • __bkey
    • __hierarchy
    • __hierarchy_friendly_path
    • __hierarchy_friendly_parent_path

    Some examples of this syntax:

    {# data.Countries.__pkid #}
    {# data.CallManager.__bkey #}
    {{ data.CallManager.__bkey | host:172.29.248.150 }}
    {{ data.CallManager.__hierarchy | host:172.29.248.150 }}
    {{ data.CallManager.__hierarchy_friendly_path | host:172.29.248.150 }}
    {{ data.CallManager.__hierarchy_friendly_parent_path | host:172.29.248.150 }}
    

The hierarchy fields can be combined with model attribute names in a comma separated, for example:

{# data.Countries.country_name,__hierarchy,__hierarchy_friendly_path #}

Output snippet:

  [
      {
          "country_name": "Australia",
          "__hierarchy": "58d303503f44d58341d61775",
          "__hierarchy_friendly_path": "hcs"
      },
      {
          "country_name": "Bahrain",
          "__hierarchy": "58d303503f44d58341d61775",
          "__hierarchy_friendly_path": "hcs"
      },

   ...



Meta attribute properties can also be used in a macro filter. For details and
examples, refer to the topic on Macro Syntax to Filter by Meta Properties.
  • To indicate sequence instance with SEQ - the value is a loop sequence number starting from 1 or a wizard step number:

    • It is obtained from a Foreach List Macro in a provisioning workflow or a Foreach Elements loop in a configuration template.

      This value can be used to refer to an attribute of a model. An array item in a configuration template has a Foreach Elements loop with a variable phoneX:

      {# self.Phone.{{fn.subtract input.phoneX.SEQ,1}}.lines.line #}
      

      that refers to an attribute (line in a list of phones), starting with the first one:

      self.Phone.0.lines.line

    • This value can be used to refer to a Wizard step (stepSTEPNUMBER) in its configuration template. A Foreach Elements loop with a variable step that holds a list of STEPNUMBER obtained from the wizard:

      {# input.define_wizard_steps #}
      

      so that stepSTEPNUMBER can be incremented with:

      step{{cft.step.SEQ}}