Description
This object is being used to save one piece of data for later usagea value, which can later be accessed by another Shareable Value Object with the same name. It is not persistent between app or server restarts.
Info |
---|
The name of the object will be used to uniquely identify this 'Data ContainerShareable Value' within the app. For info on this behavior read this: Data Processing. |
...
App Builder Object
...
Source Code
Code Block | ||
---|---|---|
| ||
function execute() { const identifierVar = `${nodeName}-variable`; // Setup variable if (globalContext[identifierVar] === undefined) { globalContext[identifierVar] = {}; } switch (trigger) { case 0: // Read if (globalContext[identifierVar].value !== undefined) { return [globalContext[identifierVar], new Date()]; } break; case 1: // Set [, globalContext[identifierVar]] = inPorts; return [globalContext[identifierVar], new Date()]; default: break; } return []; } |
...
In Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 |
Read | Trigger | This port is being used to trigger the |
“Shareable Value“. This means that the value |
that is saved will be send through the value out port. | |||
2 | Value | Any | This port is being used to |
send the message including the value which is supposed to be saved inside the ' |
Shareable Value'. |
...
Out Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | Value | Any | This port is being used to send out the stored value of the ' |
2
Trigger
Trigger
Shareable Value'. |
...
Properties
Name | Description |
---|---|
Object Name | The name of the object on the canvas. |
Show Code View | The switch to turn on code view for the Code Object. |
Duplicate code into custom Code Object |