Skip to main content
Version: 4.63

setDelimiters

Sets the delimiters for the current list of actions.

Field Configurations​

KeyTypeDescriptionDefault Value
"params" (required)ObjectThe parameters for the actionnull

Parameters​

KeyTypeDescriptionDefault Value
"async"BooleanSpecifies whether the action should perform asynchronously.null
"leadingDelimiter" (required)StringThe leading delimeter stringnull
"trailingDelimiter" (required)StringThe traling delimeter stringnull

Inherited​

From Base Action

Base Action

Field Configurations

KeyTypeDescriptionDefault Value
"dynamicParams"ObjectDynamic params to retrieve data from a specific context e.g. a userSetting.null
"leadingDelimiter"StringThe leading mustache delimiter to use.null
"params"Object,ArrayObject containing the properties of the action.null
"trailingDelimiter"StringThe trailing mustache delimiter to use.null
"type"StringType name of the action.null

Examples​

Example 1: Set custom delimiters​

Show ExampleHide Example

When the event is triggered, the action chain retrieves the count value from Table 1 and displays it using the showMessage action. The action chain then compares the count values from Table 1 and Table 2 and displays the result using a showMessage action.

{
"events": {
"name": "comparisonTableCount",
"leadingDelimiter": "{{",
"trailingDelimiter": "}}",
"actions": [
{
"type": "executeQuerySQL",
"params": {
"async": false,
"sql": "Select count(*) FROM table1) as table1_count",
"queryParams": [],
"onSuccess": "table1_count",
"onSuccessType": "return"
}
},
{
"type": "showMessage",
"params": {
"text": "{{table1_count.results.0.table1_count}}{{table1_count.results.first.table1_count}}"
}
},
{
"type": "executeQuerySQL",
"params": {
"async": false,
"sql": "SELECT (Select count(*) FROM table1) as table1_count, (Select count(*) FROM table2) as table2_count",
"queryParams": [],
"onSuccess": "count",
"onSuccessType": "return"
}
},
{
"type": "setDelimiters",
"params": {
"leadingDelimiter": "{&",
"trailingDelimiter": "&}"
}
},
{
"type": "if",
"params": {
"async": false,
"condition": {
"mode": "equal",
"left": {
"value": "{&count.results.0.table1_count&}{&count.results.first.table1_count&}"
},
"right": {
"value": "{&count.results.0.table2_count&}{&count.results.first.table2_count&}"
}
},
"then": [
{
"type": "showMessage",
"params": {
"text": "The values are the same"
}
}
],
"else": [
{
"type": "showMessage",
"params": {
"text": "The values are different"
}
}
]
}
}
]
}
}