This object is being used to save a value, which can later be accessed by another Shareable Value Object with the same name. It is not persistent between app or server restarts.
The name of the object will be used to uniquely identify this 'Shareable Value' within the app. For info on this behavior read this: Data Processing. |
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 []; } |
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'. |
Position | Name | Message Type | Description |
---|---|---|---|
1 | Value | Any | This port is being used to send out the stored value of the 'Shareable Value'. |
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 |