From Bright Pattern Documentation
Jump to: navigation, search
imported>Elizabeth
 
(Updated via BpDeleteTranslateTags script)
 
Line 1: Line 1:
<translate>= Variable Parameters =
+
= Variable Parameters =
 
This section describes parameters you may add to your [[Scenario-builder-reference-guide/Reference/VariablesandExpressions/Variables|scenario]] or [[Workflow-builder-reference-guide/Variables|workflow]] variables.
 
This section describes parameters you may add to your [[Scenario-builder-reference-guide/Reference/VariablesandExpressions/Variables|scenario]] or [[Workflow-builder-reference-guide/Variables|workflow]] variables.
  
Line 33: Line 33:
  
 
  {"pilot": "Pete \"Maverick\" Mitchell"}
 
  {"pilot": "Pete \"Maverick\" Mitchell"}
 
 
 
 
 
 
</translate>
 

Latest revision as of 04:14, 29 May 2024

• 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.

$(variable,parameter)

For example:

$(item.from,escapejson)

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.

Parameters

escapejson

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"}

< Previous | Next >