From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.8

Variable Parameters

This section describes parameters you may add to your scenario or workflow variables.

How to Use a Variable Parameter

A variable parameter is added within the variable selector (i.e., inside the parentheses) after the variable and separated by a comma.


For example:


Usage Notes

  • The variable parameter, but not the variable itself, is case insensitive. For example, escapejson, escapeJSON, and EscapeJson are treated the same.
  • The variable parameter should not be enclosed in single or double quotes; it is considered to be part of the variable name.
  • The variable parameter is allowed to have whitespaces before and/or after comma; they are trimmed out in the runtime.
  • Multiple parameters cannot be invoked within the same variable.



When invoked, escapejson will escape (i.e., insert a backslash in front of) invalid JSON characters from the value of the variable. This includes the following:

  • Double quotes (")
  • Backslashes (\)
  • Any control characters (e.g., \n)

For example, where $(item.from) = Pete "Maverick" Mitchell:

{"pilot": "$(item.from,escapejson)"}

The following will be returned:

{"pilot": "Pete \"Maverick\" Mitchell"}


This parameter escapes characters that break XML structure, to rephrase the above example:

For example, where $(item.from) = Pete "Maverick" Mitchell:

<pilot name="$(item.from,escapeXML)">

The following will be returned:

<pilot name="Pete &quot;Maverick&quot; Mitchell">
< Previous | Next >