I want to split a Database result in different outputs from a function node.
The database query works:
25.4.2019, 21:21:26node: 6acfe7c1.46d2c8SELECT * FROM tb_Pool_Variables : msg : Object
object
_msgid: "763b500d.377b"
topic: "SELECT * FROM tb_Pool_Variables"
payload: array[1]
0: object
Max_Pool_Temp: 30
Einschalthysterese: 6
Ausschalthysterese: 1
Now i try to seperate Max_Pool_Temp, Einschalthysterese and Ausschalthysterese to 3 outputs of an function node.
I always get the message:
Function tried to send a message of type number
Yes i want to send a message of type number?!?
I tried to cast it to string, then i get the error message : Fuction tried to send a message of type String.
I would be very grateful if someone could help me.
Please excuse my poor english.
Firstly, your English is fine. You really need to post your flow here so that we can have a look. It looks like you are trying to return just a number in your function but you need to return the message object!
The fundamental issue is that you must always return an object (ie a message), not just a value or string. Often what you want to do is return a message with a value in the payload, so you may want the return to be something like