# Change node not working according to my problem

**URL:** https://discourse.nodered.org/t/change-node-not-working-according-to-my-problem/71371
**Category:** General
**Tags:** database, function-node
**Created:** [28 November 2022 11:03 UTC](https://discourse.nodered.org/t/change-node-not-working-according-to-my-problem/71371 "2022-11-28T11:03:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sai.teja](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sai.teja](https://discourse.nodered.org/u/sai.teja)
#### Post date: [28 November 2022 11:03 UTC](https://discourse.nodered.org/t/change-node-not-working-according-to-my-problem/71371/1 "2022-11-28T11:03:07Z")

</div>

Hi, I have a created a data model from s7 in plc to influx dB data type using change node. Everything works fine, But I have a issue, we have total of 4 lines, so all 3 lines have 2 machines except one line which has three machines. So now I have a problem in grafana to create a dashboard dynamically because for the lines with no 3rd machine shows no data in the visualisation. so I'm trying to create a dummy machine injecting 0 as a value. But the problem is I also want them to combine with sap order currently running. So this is my flow now for the new node and the configuration in the change node

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/5/15ca485df2a2ab934a0c74d75e35864b92042111.png)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bda779f4e66bb43d38f9425e1ca2fb6645a59553.png)

It gives me output with counterIN for machine 3 as 0 but still the sap number cannot be included with it. in the output it says "Cannot set property of non-object type:

Can you guys suggest me a solution?

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [28 November 2022 13:10 UTC](https://discourse.nodered.org/t/change-node-not-working-according-to-my-problem/71371/2 "2022-11-28T13:10:55Z")

</div>

> [@sai.teja](#):
>
> But the problem is I also want them to combine with sap order currently running

Node red `msg`s travel completely independant of each other.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/d/fd4fcb32ad550e13108295e1f1dbb3a0ba59c6fb.png)

You should give them both topics and use the join node...

See [this article in the cookbook](https://cookbook.nodered.org/basic/join-streams) for an example of how to join messages into one object.

---

<div class="post-metadata">

### Author: ![sai.teja](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sai.teja](https://discourse.nodered.org/u/sai.teja)
#### Post date: [29 November 2022 09:42 UTC](https://discourse.nodered.org/t/change-node-not-working-according-to-my-problem/71371/3 "2022-11-29T09:42:16Z")

</div>

I already tried to do that and it worked. Thanks !

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [13 December 2022 09:43 UTC](https://discourse.nodered.org/t/change-node-not-working-according-to-my-problem/71371/4 "2022-12-13T09:43:03Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
