Once more, I think i have a priblem with my syntax.
I want to compare to things The msg.payload sent previously by an Inject node (boolean true or false) and a global variable xNR_I1 wich can have the values "Active' or 'Inactive".
Then, according to the result, I set the msg.payload to "Entrée I activée" or "Entrée 1 désactivée".
But the msg.payload always returns the input msg.payload.
I suppose my test in not written correctly, but even after several syntax tests, that still don't work.
Here is my node
[{"id":"360cf844.a58228","type":"function","z":"987ca6e6.534d28","name":"Test if Input 1 value has changed, and tweet it","func":"if\n((msg.payload === true) && (global.get(\"xNR_I1\") === \"Inactive\"))\n{msg.payload = \"Entree 1 Activée\"}\nelse\nif\n((msg.payload === false) && (global.get(\"xNR_I1\") === \"Active\"))\n{msg.payload = \"Entree 1 Désactivée\"}\nreturn msg;\n","outputs":1,"noerr":0,"x":1273.018798828125,"y":135.02500915527344,"wires":[["eda47117.c99aa","42fd53e8.195cbc"]]}]