...
This page provides an overview of these helper functions, which can all be used inside block code.
Table of Contents | ||||
---|---|---|---|---|
|
Packages
All The following packages are provided by Canvas, and which can be used in block JS-Javascript code:
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
...
Expand | ||
---|---|---|
| ||
|
Code Block |
---|
return arr; |
Note |
---|
Please note that following values will be converted to null and logged as null then:
|
myVault
myVault is a package which contains methods for working with collections of keys-value pairs. All methods are grouped by access level type:
...
There are myVault methods which you can call in js-code:
Description | Workflow level | Account level |
---|---|---|
Writes key and value into myVault dictionary | ||
Writes key and value into myVault dictionary on the workflow complete event | ||
Reads value from myVault dictionary by specified key | ||
Removes key-value pair from myVault dictionary by specified key | ||
Determines whether the myVault dictionary contains the specified key |
myVault.set
Writes key and value into myVault dictionary belonged to the workflow.
...
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
session
...
session.vault is an object of is stored for each workflow running. session is empty when new run is started (from first block) and is passed to next blocks till last. If you start running not from 1st block, for example from 3nd block, then session will be copied from 2nd block of previous running.
session.vault
session.vault is an object of keys-value pairs which was set by myVault.setOnComplete() method and which will be moved into myVault on workflow complete event.
...
Expand | ||
---|---|---|
| ||
let v = getVariables(); let url = `quin/Sections?apikey=${v.apiKey}`; let sections = await api.get(url); |
getWorkflowVariables()
Returns array of workflow variables. No parameters.
Expand | ||
---|---|---|
| ||
let v = getWorkflowVariables(); let url = `quin/Sections?apikey=${v.apiKey}`; let sections = await api.get(url); |
...