id_variables

Name the variables block; helpful when there are multiple

Topics

block_identifier

Specification

  • Alias: None

  • Arguments: None

  • JSON argument key: None

Description

The optional id_variables keyword accepts a string that uniquely identifies this variables block. A model can then use these variables by specifying the same string in its variables_pointer specification.

Default Behavior

If the id_variables specification is omitted, a particular variables specification will be used by a model only if that model does not include an variables_pointer and the variables block was the last (or only) one parsed.

Usage Tips

  • It is a best practice to always use explicit variables IDs and pointers to avoid confusion.

  • If only one variables block exists, then id_variables can be safely omitted from the variables block (and variables_pointer omitted from the model specification(s)), since there is no ambiguity.

Examples

For example, a model specification including

model
  variables_pointer = 'V1'
{
  "model": [
    {
      "single": {
        "variables_pointer": "V1"
      }
    }
  ]
}

will link to a variables block with

variables
  id_variables = 'V1'
{
  "variables": [
    {
      "id_variables": "V1"
    }
  ]
}