Concatenation of two numeric values

hello, can anyone tell me why do i have NaN on my payload output ?


What is button1 sending in the payload?

nothing the button is just used as an inject node

So without your flow I’m just asking questions so what are the change nodes setting the payload to? Are you sending strings by any chance?

The two change nodes will each send a separate message to the function node. The function node will only see one of those at a time, so it will only see either msg.payload1 or msg.payload2, not both at once. That means that either a or b will be undefined for each message. You can use a Join node to join the messages together, or put the two function nodes one after the other not in parallel.

See this article in the cookbook for an example of how to join messages into one object.

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