Dynamic Tags in QPR UI
Tags can be used in many settings fields when designing dashboards to add dynamic behaviour to the dashboards. If a tag used in a presentation object's settings field refers to a context variable, and that variable values changes, also that setting field value changes and the presentation object updates to reflect the new settings.
Evaluating a tag means that the tag is parsed (detected) from the containing text, its intended behaviour is executed and the tag definition is replaced by the tag's return value. Tags in textual settings are always evaluated before the setting value is used by the UI element. During the tag evaluation the setting value is treated as text only, although it might be JSON, SVG or CSS.
Tags have the following syntax: <#tagname parameter1="value1" parameter2="value2" ... parameterN="valueN">
In more details:
- Tag starts with <#tagname, where tagname is the name of the tag, and ends with > character.
- Tag contains one or many parameters as name-value pairs (parameters are separated by space).
- Parameter name is followed by = which is followed by parameter value in double-quotes (").
- If parameter value contains double-quotes they are escaped with \ character, example \". \ character is escaped with \\.
- Newline characters are not allowed in tags (if a newline character is encountered, the searched text ends)
<#action name="drill\\down\"abc\""> (name parameter contents: drill\down"abc")
A tag is assumed if a text contains <#tagname (including the space) appears in the text. If the syntax doesn't continue according to the syntax rules, an error is caused.
Dynamic tags can be used in following settings:
- Data Grid presentation object JSON settings field
- HTML presentation object HTML code field
- SVG presentation object SVG code field
- Panel and any presentation object Name field
- Dataset query and parameter fields
- QPR Suite Web Service query and parameter fields in Gata Grid presentation object's Query tab