...
Code Block | ||
---|---|---|
| ||
function execute() { if (!context.string) { context.string = ''; } switch (trigger) { case 0: // Add String context.string += inPorts[0].value; // Reset inPort to accept also the same string message editInPort(0, {}); break; case 1: // Clear context.string = ''; break; default: break; } return [context.string, new Date()]; } |
...
In Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | String | String | This port is being used to receive a string message and append it to the string stored in the 'String Concatenate' Object. |
2 | Clear | Trigger | This port is being used to clear the internal string of the 'String Concatenate' Object. |
...
Out Ports
Position | Name | Message Type | Description |
---|---|---|---|
1 | String | String | This port is being used to send out the message containing the concatenated string of the 'String Concatenate' Object, whenever a new string is appended through the In Port 1. |
2 | Trigger | Trigger | This port is being used to send out a trigger message after the Out Port 1 has send out the message containing the concatenated string. |
...
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 |