Wie können wir Ihnen helfen?
< Zurück
Drucken

Parameters – Macros

Macros can be used to define frequently occurring, more complex expressions, for example in the workspace parameters. Macro placeholders can be specified within a parameter value.

 

Definition:

A macro is defined as a parameter and macro placeholders by “{0}”, “{1}”, etc.

ParameterValue
HelloSay ${0} to the {1}!

 

Usage:

If an opening round bracket “(” is appended to a parameter placeholder, the expression is not interpreted as a parameter but as a macro.

--- !ClientQuery
Id: Makro
Statement: Select '${Hello}' as Parameter, '${Hello(servus,reader)}' as Macro

Result:

ParameterMacro
Say {0} to the {1}!Say servus to the reader!

 

Escaping:

Characters (especially the comma) can be escaped within a macro by backslash.

--- !ClientQuery
Id: Macro
Statement: Select
    '${Hello(hi\,,reader)}' as Comma,
    '${Hello(\\hi\\,reader)}' as Backslash,
    '${Hello(\{hi$},reader)}' as CurlyBrackets,
    '${Hello((hi),(reader))}' as RoundBrackets

Result:

CommaBackslashCurlyBracketsRoundBrackets
Say hi, to the reader!Say \hi\ to the reader!Say {hi} to the reader!Say (hi) to the (reader)!
Inhaltsverzeichnis