Difference between revisions of "Dynamic Tags in QPR UI"

From Mea Wiki
Jump to navigation Jump to search
(403760)
Line 2: Line 2:
  
 
== Supported tags ==
 
== Supported tags ==
* [[Variable Tag in QPR MobileDashboard|Variable tag]]
+
* [[Variable Tag in QPR UI|Variable tag]]
* [[Expression Tag in QPR MobileDashboard|Expression tag]]
+
* [[Expression Tag in QPR UI|Expression tag]]
* [[Action Tag in QPR MobileDashboard|Action tag]]
+
* [[Action Tag in QPR UI|Action tag]]
* [[Dataset Tag in QPR MobileDashboard|Dataset tag]] (will be supported in MDB 2017.8)
+
* [[Dataset Tag in QPR UI|Dataset tag]] (will be supported in MDB 2017.8)
* [[Translate Tag in QPR MobileDashboard|Translate tag]] (supported in near future)
+
* [[Translate Tag in QPR UI|Translate tag]] (supported in near future)
  
 
== General about dynamic tags ==
 
== General about dynamic tags ==
Line 51: Line 51:
 
* [[Panel Properties|Panel]] and any presentation object '''Name''' field (Variable tag and the short syntax)
 
* [[Panel Properties|Panel]] and any presentation object '''Name''' field (Variable tag and the short syntax)
 
* ProcessAnalyzer and QPR Suite web service queries in data grid presentation object's Query tab (Variable tag and the short syntax)
 
* ProcessAnalyzer and QPR Suite web service queries in data grid presentation object's Query tab (Variable tag and the short syntax)
 +
 +
[[Category: QPR UI]]

Revision as of 06:41, 7 November 2017

QPR supports tags that are defined in this page.

Supported tags

General about dynamic tags

In some UI element textual settings it is possible to use some of the below defined tags to achieve more dynamic behaviour of dashboards.

Evaluating a tag means that

  1. The tag is parsed (detected) from the containing text
  2. Its intended behaviour is executed
  3. 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.

Tag syntax

Tag syntax has the following general form: <#tagname parameter1="value1" parameter2="value2" ... parameterN="valueN">

In more details, tags have the following syntax:

  • Tag starts with <#tagname, where tagname is the name of the tag. There is always a space after the tagName.
  • Tag 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)

Tag is assumed if tag start <#tagname (including the space) appears in the text. If the syntax doesn't continue according to the syntax rules, an error is caused. This means that the tag parser needs to know which tags names are available in the parsed content.

Examples of syntaxes that cause tag parsing error:

  • <#variable name="var1"
  • <#variable name="var1"escape="json">
  • <#variable name="var1" escape=json">
  • <#variable name="var1" escape=json>
  • <#variable name="var"1" escape="json">

Examples of syntax that doesn't cause error, because the beginning is not interpreted as a tag (assuming "variable" tags can be used in the parsed content):

  • <variable (hash character missing)
  • <#variables (no space after "variable")

Escaping examples:

  • <#action name="drill\\down\"abc\""> (name parameter contents: drill\down"abc")

Settings where tags can be used

Dynamic tags can be used in following settings:

  • Data Grid presentation object JSON settings field (Variable tag and the short syntax)
  • SVG presentation object SVG code field (Action tag, Variable tag and and the short syntax)
  • Panel and any presentation object Name field (Variable tag and the short syntax)
  • ProcessAnalyzer and QPR Suite web service queries in data grid presentation object's Query tab (Variable tag and the short syntax)