Browse Source

Update UI helps

pull/6180/head
Igor Kulikov 5 years ago
parent
commit
235deb5230
  1. 12
      ui-ngx/src/assets/help/en_US/rulenode/transformation_node_script_fn.md

12
ui-ngx/src/assets/help/en_US/rulenode/transformation_node_script_fn.md

@ -66,6 +66,18 @@ return {msg: msg, metadata: metadata, msgType: newType};
{:copy-code}
```
* Replace the incoming message with **two** new messages that contain only one field - sum or difference of properties in the original message:
```javascript
var sum = msg.a + msg.b;
var diff = msg.a - msg.b;
return [
{msg: {sum: sum}, metadata: metadata, msgType: msgType},
{msg: {difference: diff}, metadata: metadata, msgType: msgType}
];
```
<br>
You can see real life example, how to use this node in those tutorials:

Loading…
Cancel
Save