SWITCH - trigger on boolean name


I'm have the following situation:

I have an input node that sends out different booleans:

First time it sends this (using debug node):
Test1: msg.payload:boolean

Second time it sends this (using debug node)
Test2 :msg.payload:boolean,

so its 1 node sending out different booleans (not in an object)

The question that I have now is how i can trigger an action based on the name of the boolean ('Test1' and 'Test2' )

Can i use the 'Switch' node for this? how do i use it? what Property do i need to use? (since i can not use the ' msg.' property.. since the payload is in both cases the same (msg.payload : boolean)


For booleans you can test for is true or is false in the switch node.
Would need more info to help more, post the sectiion of your flow that is relevant, and the full values from debug message. Hint there is a hoover over button That will copy the relevant properties values here.

Can you copy your test flow and the exact content of the debug output (not only msg.payload but the entire msg) using the preformatted text structure?
With my understand on NR, you should find Test1 in msg.something... and the value of msg.someting in msg.somethingelse. One of the "something" could be payload :slight_smile:

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