Create a function with 2 outputs with condition

Hi all,

I want to make a function node with 2 conditions and so 2 output.
This node need to check if 2 conditions are true. Conditions are :
70 values and SHORT are true go to msg 1 (output 1)
else go to msg 2 (output 2)

So to make this i writed this :

 var msg1 = {};
 var msg2 = {};

    if(msg.payload == "SHORT" && msg.payload == "70") 
{
    msg1.payload = ("please activate Vidéo 70");
    return [msg1, null];
}  else
{
    msg2.payload = ("Bad mode slected");
    return [null, msg2];
}

But my problem, my message go only in msg 2 even if 2 conditions are true.

in fact i've an input with button to select a short or long mode. After this, we need to clik on a button to play a short vidéo or long vidéo.

So, when i select a short mode by the button, and clik on my button to launch the video i've always bad mode slected...

I put a debug node to my button and i've short or long, so is ok.
I put a debug node too in my dashboard button and i've 70. So all is okay. But my function node does'nt work.

I'm a beginner in javascript.

the 2 conditions can never be true because msg.payload cannot be both "SHORT" and "70" at the same time.

My suspicion is your values are coming from 2 different wires into the function. In which case, you should try the join node to get both values into one message...

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

THanks to your reply Steve-MCL,

You are right. my values come from 2 different wires into the function.

So if i understand well, I use a join node. I pluged my 2 wires, and I've only one message, so this step is okay. i've short 70 in my debug node.

So now, how to make a message if this condition is not true ? I need to use a split node ?

I tried this

[
    {
        "id": "9497ea9b98f7eb97",
        "type": "debug",
        "z": "3deae33dc9a74eba",
        "name": "",
        "active": false,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 3470,
        "y": 440,
        "wires": []
    },
    {
        "id": "00c4d5806c177d1b",
        "type": "ui_text",
        "z": "3deae33dc9a74eba",
        "group": "0c820bec3540b682",
        "order": 1,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "Mode",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "x": 3450,
        "y": 380,
        "wires": []
    },
    {
        "id": "69019889fcbf03d7",
        "type": "link out",
        "z": "3deae33dc9a74eba",
        "name": "Etat switch long court",
        "mode": "link",
        "links": [
            "4e40e81e2203af73"
        ],
        "x": 3575,
        "y": 260,
        "wires": []
    },
    {
        "id": "c7b97f8cc3c2620a",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "name": "Conversion 0/1 en COURT/LONG",
        "rules": [
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "0",
                "fromt": "num",
                "to": "COURT",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "1",
                "fromt": "num",
                "to": "LONG",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 3220,
        "y": 380,
        "wires": [
            [
                "00c4d5806c177d1b",
                "9497ea9b98f7eb97",
                "69019889fcbf03d7"
            ]
        ]
    },
    {
        "id": "97e5d26215d0f36f",
        "type": "function",
        "z": "3deae33dc9a74eba",
        "name": "MODE SWITCH",
        "func": "if (msg.payload==0){\n    global.set(\"MODE\",\"COURT\");\n}\nif (msg.payload==1){\n    global.set(\"MODE\",\"LONG\");\n}\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 2970,
        "y": 380,
        "wires": [
            [
                "c7b97f8cc3c2620a"
            ]
        ]
    },
    {
        "id": "a4a6641b24d46114",
        "type": "rpi-gpio in",
        "z": "3deae33dc9a74eba",
        "name": "Mode LONG/COURT",
        "pin": "5",
        "intype": "up",
        "debounce": "25",
        "read": true,
        "bcm": true,
        "x": 2720,
        "y": 380,
        "wires": [
            [
                "97e5d26215d0f36f"
            ]
        ]
    },
    {
        "id": "b5d99d33329f3d8b",
        "type": "inject",
        "z": "3deae33dc9a74eba",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "LONG",
        "payloadType": "str",
        "x": 2770,
        "y": 280,
        "wires": [
            [
                "97e5d26215d0f36f"
            ]
        ]
    },
    {
        "id": "be2049c240f4cd84",
        "type": "inject",
        "z": "3deae33dc9a74eba",
        "name": "",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "COURT",
        "payloadType": "str",
        "x": 2770,
        "y": 220,
        "wires": [
            [
                "97e5d26215d0f36f"
            ]
        ]
    },
    {
        "id": "803f565b0df49aa4",
        "type": "group",
        "z": "3deae33dc9a74eba",
        "name": "lancement éclipse + décompte",
        "style": {
            "stroke": "#c8e7a7",
            "fill": "#c8e7a7",
            "label": true,
            "label-position": "n",
            "color": "#000000"
        },
        "nodes": [
            "7100f65700c52fd1",
            "69b855249ca4873f",
            "892634c7713b3c24",
            "362ea86b498bedd7",
            "8490dc0cd54b9b97",
            "910992f7c3892425",
            "773a707bbfa94aa4",
            "63d4f2ee65ee6dc7",
            "4ffe6ee35282efc0",
            "97e21392efe117a3",
            "75f467b3e0f3aa90",
            "7f8181e8e8d21082",
            "1dc14908c65914c3",
            "8579eb28057290d5",
            "a385086ee4703330",
            "ed19ceee17086cb8",
            "d610874920df585b",
            "48f1dbc77249a868",
            "358346d5a7a56d20",
            "4e40e81e2203af73",
            "62c34bb009b99a29",
            "e67374793e8eabdc",
            "5a4a021d9b4e3037",
            "426e57dc36c36558",
            "efb141e14dcf2f06",
            "19eb288b7240e75f",
            "2b53786c0f9af926",
            "14b71cbcca63f9a8"
        ],
        "x": 334,
        "y": 1779,
        "w": 1672,
        "h": 622
    },
    {
        "id": "7100f65700c52fd1",
        "type": "ui_button",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Eclipse 70 mn",
        "group": "0c820bec3540b682",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Eclipse 70 minutes",
        "tooltip": "",
        "color": "white",
        "bgcolor": "{{background}}",
        "className": "",
        "icon": "",
        "payload": "Es-tu sur de lancer l'éclipse 70 minutes ?",
        "payloadType": "str",
        "topic": "dash",
        "topicType": "msg",
        "x": 500,
        "y": 1820,
        "wires": [
            [
                "efb141e14dcf2f06"
            ]
        ]
    },
    {
        "id": "69b855249ca4873f",
        "type": "exec",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "command": "DISPLAY=:0 gnome-terminal --geometry=80x30+1950+100 -- cvlc --fullscreen  /home/timoxy/Desktop/ECLIPSE70.mp4",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "0",
        "winHide": false,
        "oldrc": false,
        "name": "Video eclipse 70",
        "x": 1700,
        "y": 1880,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "892634c7713b3c24",
        "type": "ui_button",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Eclipse 100 mn",
        "group": "0c820bec3540b682",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Eclipse 100 minutes",
        "tooltip": "",
        "color": "",
        "bgcolor": "{{background}}",
        "className": "",
        "icon": "",
        "payload": "Es-tu sur de lancer l'éclipse 100 minutes ?",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 660,
        "y": 2220,
        "wires": [
            [
                "48f1dbc77249a868",
                "b672a2bf2d98bdf9"
            ]
        ]
    },
    {
        "id": "362ea86b498bedd7",
        "type": "exec",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "command": "DISPLAY=:0 gnome-terminal --geometry=80x30+1950+100 -- cvlc --fullscreen  /home/timoxy/Desktop/ECLIPSE100.mp4",
        "addpay": "payload",
        "append": "",
        "useSpawn": "false",
        "timer": "0",
        "winHide": false,
        "oldrc": false,
        "name": "Video eclipse 100",
        "x": 1310,
        "y": 2260,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "8490dc0cd54b9b97",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "sec to hh:mm:ss",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$moment(\t  $moment()\t    .add($$.payload, 'seconds')\t    .diff($moment())\t).utc().format('HH:mm:ss')",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1900,
        "y": 1820,
        "wires": [
            [
                "4ffe6ee35282efc0"
            ]
        ]
    },
    {
        "id": "910992f7c3892425",
        "type": "countdown",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Décompte 4200 s",
        "topic": "",
        "payloadTimerStart": "true",
        "payloadTimerStartType": "bool",
        "payloadTimerStop": "false",
        "payloadTimerStopType": "bool",
        "timer": "4200",
        "resetWhileRunning": false,
        "outputOnReset": true,
        "setTimeToNewWhileRunning": true,
        "startCountdownOnControlMessage": false,
        "x": 1710,
        "y": 1820,
        "wires": [
            [],
            [
                "8490dc0cd54b9b97"
            ]
        ]
    },
    {
        "id": "773a707bbfa94aa4",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "sec to hh:mm:ss",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$moment(\t  $moment()\t    .add($$.payload, 'seconds')\t    .diff($moment())\t).utc().format('HH:mm:ss')",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1500,
        "y": 2200,
        "wires": [
            [
                "4ffe6ee35282efc0"
            ]
        ]
    },
    {
        "id": "63d4f2ee65ee6dc7",
        "type": "countdown",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Décompte 6000 s",
        "topic": "",
        "payloadTimerStart": "true",
        "payloadTimerStartType": "bool",
        "payloadTimerStop": "false",
        "payloadTimerStopType": "bool",
        "timer": "6000",
        "resetWhileRunning": false,
        "outputOnReset": true,
        "setTimeToNewWhileRunning": true,
        "startCountdownOnControlMessage": false,
        "x": 1310,
        "y": 2200,
        "wires": [
            [],
            [
                "773a707bbfa94aa4"
            ]
        ]
    },
    {
        "id": "4ffe6ee35282efc0",
        "type": "ui_text",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "group": "0c820bec3540b682",
        "order": 4,
        "width": 0,
        "height": 0,
        "name": "Décompte",
        "label": "Fin de la partie dans",
        "format": "{{msg.payload}}",
        "layout": "row-spread",
        "className": "",
        "x": 1790,
        "y": 2020,
        "wires": []
    },
    {
        "id": "97e21392efe117a3",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Rouge",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "red",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 890,
        "y": 2000,
        "wires": [
            [
                "7100f65700c52fd1"
            ]
        ]
    },
    {
        "id": "75f467b3e0f3aa90",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Délai rouge",
        "pauseType": "delay",
        "timeout": "4190",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 890,
        "y": 2060,
        "wires": [
            [
                "97e21392efe117a3"
            ]
        ]
    },
    {
        "id": "7f8181e8e8d21082",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Delai passage vert",
        "pauseType": "delay",
        "timeout": "0.5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 650,
        "y": 2060,
        "wires": [
            [
                "75f467b3e0f3aa90",
                "1dc14908c65914c3"
            ]
        ]
    },
    {
        "id": "1dc14908c65914c3",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Vert",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "Green",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 650,
        "y": 2000,
        "wires": [
            [
                "7100f65700c52fd1"
            ]
        ]
    },
    {
        "id": "8579eb28057290d5",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Rouge",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "red",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 750,
        "y": 2300,
        "wires": [
            [
                "892634c7713b3c24"
            ]
        ]
    },
    {
        "id": "a385086ee4703330",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Délai rouge",
        "pauseType": "delay",
        "timeout": "5990",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 730,
        "y": 2360,
        "wires": [
            [
                "8579eb28057290d5"
            ]
        ]
    },
    {
        "id": "ed19ceee17086cb8",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Delai passage vert",
        "pauseType": "delay",
        "timeout": "0.5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 490,
        "y": 2360,
        "wires": [
            [
                "a385086ee4703330",
                "d610874920df585b"
            ]
        ]
    },
    {
        "id": "d610874920df585b",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Vert",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "Green",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 490,
        "y": 2300,
        "wires": [
            [
                "892634c7713b3c24"
            ]
        ]
    },
    {
        "id": "48f1dbc77249a868",
        "type": "junction",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "x": 360,
        "y": 2160,
        "wires": [
            [
                "ed19ceee17086cb8"
            ]
        ]
    },
    {
        "id": "358346d5a7a56d20",
        "type": "function",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Confirm",
        "func": "//only accept OK msg's\nif (msg.payload == 'OK') {\n    msg.payload = \"Stop\";\n    node.send(msg);\n}\nreturn null;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1100,
        "y": 2220,
        "wires": [
            [
                "362ea86b498bedd7",
                "63d4f2ee65ee6dc7"
            ]
        ]
    },
    {
        "id": "4e40e81e2203af73",
        "type": "link in",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "link in 2",
        "links": [
            "69019889fcbf03d7"
        ],
        "x": 555,
        "y": 1860,
        "wires": [
            [
                "19eb288b7240e75f"
            ]
        ]
    },
    {
        "id": "62c34bb009b99a29",
        "type": "debug",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1380,
        "y": 1880,
        "wires": []
    },
    {
        "id": "e67374793e8eabdc",
        "type": "ui_toast",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "position": "dialog",
        "displayTime": "3",
        "highlight": "",
        "sendall": true,
        "outputs": 1,
        "ok": "OK",
        "cancel": "Non",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "Eclipse 70",
        "x": 1170,
        "y": 1820,
        "wires": [
            [
                "5a4a021d9b4e3037"
            ]
        ]
    },
    {
        "id": "5a4a021d9b4e3037",
        "type": "function",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Confirm",
        "func": "//only accept OK msg's\nif (msg.payload == 'OK') {\n    msg.payload = \"70\";\n    node.send(msg);\n}\nreturn null;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1340,
        "y": 1820,
        "wires": [
            [
                "426e57dc36c36558"
            ]
        ]
    },
    {
        "id": "426e57dc36c36558",
        "type": "switch",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "filtre info",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Veuillez activer la vidéo 70",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Mauvais mode selectionné",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1500,
        "y": 1820,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "efb141e14dcf2f06",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "70",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 700,
        "y": 1820,
        "wires": [
            [
                "19eb288b7240e75f"
            ]
        ]
    },
    {
        "id": "19eb288b7240e75f",
        "type": "join",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Verification des 2 etats 70",
        "mode": "custom",
        "build": "string",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 910,
        "y": 1880,
        "wires": [
            [
                "2b53786c0f9af926"
            ]
        ]
    },
    {
        "id": "2b53786c0f9af926",
        "type": "switch",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "filtre",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "COURT 70",
                "vt": "str"
            },
            {
                "t": "neq",
                "v": "COURT 70",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1170,
        "y": 1900,
        "wires": [
            [
                "62c34bb009b99a29"
            ],
            [
                "14b71cbcca63f9a8"
            ]
        ]
    },
    {
        "id": "14b71cbcca63f9a8",
        "type": "debug",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "debug 4",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1380,
        "y": 1940,
        "wires": []
    },
    {
        "id": "0c820bec3540b682",
        "type": "ui_group",
        "name": "Paramétrages",
        "tab": "cb8fc504867904ea",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "cb8fc504867904ea",
        "type": "ui_tab",
        "name": "Salle INDIANA",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

But my message go again in output 2...

What are you getting out of the join node? Also show us how you have configured it.

I can see SHORT 70 in output join node

(i can't upload picture, i've an error on the forum when i try to upload a picture.)
I'm in manual mode
Combine each msg.payload
To create a string (in key value i've an error with topic)
joined using as string\n
after number message parts 2.

You need to use key/value mode and make sure that the messages from the two routes have different topics. Look at what you are getting out and make sure you understand it. Then look at the Working with Messages page in the docs.

I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

Hi Colin, and thanks to your help and advice.

I used the join node with topic and now i've it in my output join node :

object
check: object
_msgid: "56d66e716e55a3f6"
payload: "COURT"
topic: "check"
_event: "node:69019889fcbf03d7"

button: object
payload: 70
topic: "button"
event: object
socketid: "6MZElUueEodqHwIIAAAN"
_msgid: "a0cc485166e57426

Now how it's possible to check if my topic "check" is COURT and my topic button is 70 ?
I need to check it like that is 2 rules are ok we can play the vidéo, else not play the vidéo and put a warning popup.

I don't think that is the output of the join node, it looks more like the inputs to the join node. If that really is the output then show us what the inputs look like. Also show us how you have configured the Join node

I think is much better to see all my flow, because i've lot of node.
You can find the part of my flow where i'm working.

[
    {
        "id": "a4a6641b24d46114",
        "type": "rpi-gpio in",
        "z": "3deae33dc9a74eba",
        "name": "Mode LONG/COURT",
        "pin": "5",
        "intype": "up",
        "debounce": "25",
        "read": true,
        "bcm": true,
        "x": 500,
        "y": 1940,
        "wires": [
            [
                "97e5d26215d0f36f"
            ]
        ]
    },
    {
        "id": "97e5d26215d0f36f",
        "type": "function",
        "z": "3deae33dc9a74eba",
        "name": "MODE SWITCH",
        "func": "if (msg.payload == 0){\n    msg.topic = \"check\";\n    /*global.set(\"MODE\",\"COURT\");*/\n    return msg;;\n}\nif (msg.payload == 1){\n    msg.topic = \"check\";\n    /*global.set(\"MODE\",\"LONG\");*/\n    return msg\n}\n",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 750,
        "y": 1940,
        "wires": [
            [
                "c7b97f8cc3c2620a"
            ]
        ]
    },
    {
        "id": "c7b97f8cc3c2620a",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "name": "Conversion 0/1 en COURT/LONG",
        "rules": [
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "0",
                "fromt": "num",
                "to": "COURT",
                "tot": "str"
            },
            {
                "t": "change",
                "p": "payload",
                "pt": "msg",
                "from": "1",
                "fromt": "num",
                "to": "LONG",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1080,
        "y": 1940,
        "wires": [
            [
                "00c4d5806c177d1b",
                "69019889fcbf03d7"
            ]
        ]
    },
    {
        "id": "00c4d5806c177d1b",
        "type": "ui_text",
        "z": "3deae33dc9a74eba",
        "group": "0c820bec3540b682",
        "order": 1,
        "width": 0,
        "height": 0,
        "name": "",
        "label": "Mode",
        "format": "{{msg.payload}}",
        "layout": "row-center",
        "className": "",
        "x": 1330,
        "y": 1940,
        "wires": []
    },
    {
        "id": "69019889fcbf03d7",
        "type": "link out",
        "z": "3deae33dc9a74eba",
        "name": "Etat switch long court",
        "mode": "link",
        "links": [
            "4e40e81e2203af73"
        ],
        "x": 1355,
        "y": 1820,
        "wires": []
    },
    {
        "id": "b5d99d33329f3d8b",
        "type": "inject",
        "z": "3deae33dc9a74eba",
        "name": "COURT",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "0",
        "payloadType": "num",
        "x": 570,
        "y": 1880,
        "wires": [
            [
                "97e5d26215d0f36f"
            ]
        ]
    },
    {
        "id": "3cf94947756d12c6",
        "type": "inject",
        "z": "3deae33dc9a74eba",
        "name": "LONG",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 570,
        "y": 1800,
        "wires": [
            [
                "97e5d26215d0f36f"
            ]
        ]
    },
    {
        "id": "803f565b0df49aa4",
        "type": "group",
        "z": "3deae33dc9a74eba",
        "name": "lancement éclipse + décompte",
        "style": {
            "stroke": "#c8e7a7",
            "fill": "#c8e7a7",
            "label": true,
            "label-position": "n",
            "color": "#000000"
        },
        "nodes": [
            "7100f65700c52fd1",
            "69b855249ca4873f",
            "892634c7713b3c24",
            "362ea86b498bedd7",
            "8490dc0cd54b9b97",
            "910992f7c3892425",
            "773a707bbfa94aa4",
            "63d4f2ee65ee6dc7",
            "4ffe6ee35282efc0",
            "97e21392efe117a3",
            "75f467b3e0f3aa90",
            "7f8181e8e8d21082",
            "1dc14908c65914c3",
            "8579eb28057290d5",
            "a385086ee4703330",
            "ed19ceee17086cb8",
            "d610874920df585b",
            "48f1dbc77249a868",
            "358346d5a7a56d20",
            "4e40e81e2203af73",
            "e67374793e8eabdc",
            "5a4a021d9b4e3037",
            "426e57dc36c36558",
            "efb141e14dcf2f06",
            "b672a2bf2d98bdf9",
            "f3f15ab40a68e7b7",
            "819f89938f726858"
        ],
        "x": 154,
        "y": 1999,
        "w": 1812,
        "h": 622
    },
    {
        "id": "7100f65700c52fd1",
        "type": "ui_button",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Eclipse 70 mn",
        "group": "0c820bec3540b682",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Eclipse 70 minutes",
        "tooltip": "",
        "color": "white",
        "bgcolor": "{{background}}",
        "className": "",
        "icon": "",
        "payload": "Es-tu sur de lancer l'éclipse 70 minutes ?",
        "payloadType": "str",
        "topic": "button",
        "topicType": "str",
        "x": 320,
        "y": 2040,
        "wires": [
            [
                "efb141e14dcf2f06"
            ]
        ]
    },
    {
        "id": "69b855249ca4873f",
        "type": "exec",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "command": "DISPLAY=:0 gnome-terminal --geometry=80x30+1950+100 -- cvlc --fullscreen  /home/timoxy/Desktop/ECLIPSE70.mp4",
        "addpay": "",
        "append": "",
        "useSpawn": "false",
        "timer": "0",
        "winHide": false,
        "oldrc": false,
        "name": "Video eclipse 70",
        "x": 1660,
        "y": 2100,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "892634c7713b3c24",
        "type": "ui_button",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Eclipse 100 mn",
        "group": "0c820bec3540b682",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "Eclipse 100 minutes",
        "tooltip": "",
        "color": "",
        "bgcolor": "{{background}}",
        "className": "",
        "icon": "",
        "payload": "Es-tu sur de lancer l'éclipse 100 minutes ?",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 480,
        "y": 2440,
        "wires": [
            [
                "48f1dbc77249a868",
                "b672a2bf2d98bdf9"
            ]
        ]
    },
    {
        "id": "362ea86b498bedd7",
        "type": "exec",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "command": "DISPLAY=:0 gnome-terminal --geometry=80x30+1950+100 -- cvlc --fullscreen  /home/timoxy/Desktop/ECLIPSE100.mp4",
        "addpay": "payload",
        "append": "",
        "useSpawn": "false",
        "timer": "0",
        "winHide": false,
        "oldrc": false,
        "name": "Video eclipse 100",
        "x": 1130,
        "y": 2480,
        "wires": [
            [],
            [],
            []
        ]
    },
    {
        "id": "8490dc0cd54b9b97",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "sec to hh:mm:ss",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$moment(\t  $moment()\t    .add($$.payload, 'seconds')\t    .diff($moment())\t).utc().format('HH:mm:ss')",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1860,
        "y": 2040,
        "wires": [
            [
                "4ffe6ee35282efc0"
            ]
        ]
    },
    {
        "id": "910992f7c3892425",
        "type": "countdown",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Décompte 4200 s",
        "topic": "",
        "payloadTimerStart": "true",
        "payloadTimerStartType": "bool",
        "payloadTimerStop": "false",
        "payloadTimerStopType": "bool",
        "timer": "4200",
        "resetWhileRunning": false,
        "outputOnReset": true,
        "setTimeToNewWhileRunning": true,
        "startCountdownOnControlMessage": false,
        "x": 1670,
        "y": 2040,
        "wires": [
            [],
            [
                "8490dc0cd54b9b97"
            ]
        ]
    },
    {
        "id": "773a707bbfa94aa4",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "sec to hh:mm:ss",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "$moment(\t  $moment()\t    .add($$.payload, 'seconds')\t    .diff($moment())\t).utc().format('HH:mm:ss')",
                "tot": "jsonata"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1320,
        "y": 2420,
        "wires": [
            [
                "4ffe6ee35282efc0"
            ]
        ]
    },
    {
        "id": "63d4f2ee65ee6dc7",
        "type": "countdown",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Décompte 6000 s",
        "topic": "",
        "payloadTimerStart": "true",
        "payloadTimerStartType": "bool",
        "payloadTimerStop": "false",
        "payloadTimerStopType": "bool",
        "timer": "6000",
        "resetWhileRunning": false,
        "outputOnReset": true,
        "setTimeToNewWhileRunning": true,
        "startCountdownOnControlMessage": false,
        "x": 1130,
        "y": 2420,
        "wires": [
            [],
            [
                "773a707bbfa94aa4"
            ]
        ]
    },
    {
        "id": "4ffe6ee35282efc0",
        "type": "ui_text",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "group": "0c820bec3540b682",
        "order": 4,
        "width": 0,
        "height": 0,
        "name": "Décompte",
        "label": "Fin de la partie dans",
        "format": "{{msg.payload}}",
        "layout": "row-spread",
        "className": "",
        "x": 1610,
        "y": 2240,
        "wires": []
    },
    {
        "id": "97e21392efe117a3",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Rouge",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "red",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 710,
        "y": 2220,
        "wires": [
            [
                "7100f65700c52fd1"
            ]
        ]
    },
    {
        "id": "75f467b3e0f3aa90",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Délai rouge",
        "pauseType": "delay",
        "timeout": "4190",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 710,
        "y": 2280,
        "wires": [
            [
                "97e21392efe117a3"
            ]
        ]
    },
    {
        "id": "7f8181e8e8d21082",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Delai passage vert",
        "pauseType": "delay",
        "timeout": "0.5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 470,
        "y": 2280,
        "wires": [
            [
                "75f467b3e0f3aa90",
                "1dc14908c65914c3"
            ]
        ]
    },
    {
        "id": "1dc14908c65914c3",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Vert",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "Green",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 470,
        "y": 2220,
        "wires": [
            [
                "7100f65700c52fd1"
            ]
        ]
    },
    {
        "id": "8579eb28057290d5",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Rouge",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "red",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 570,
        "y": 2520,
        "wires": [
            [
                "892634c7713b3c24"
            ]
        ]
    },
    {
        "id": "a385086ee4703330",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Délai rouge",
        "pauseType": "delay",
        "timeout": "5990",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 550,
        "y": 2580,
        "wires": [
            [
                "8579eb28057290d5"
            ]
        ]
    },
    {
        "id": "ed19ceee17086cb8",
        "type": "delay",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Delai passage vert",
        "pauseType": "delay",
        "timeout": "0.5",
        "timeoutUnits": "seconds",
        "rate": "1",
        "nbRateUnits": "1",
        "rateUnits": "second",
        "randomFirst": "1",
        "randomLast": "5",
        "randomUnits": "seconds",
        "drop": false,
        "allowrate": false,
        "outputs": 1,
        "x": 310,
        "y": 2580,
        "wires": [
            [
                "a385086ee4703330",
                "d610874920df585b"
            ]
        ]
    },
    {
        "id": "d610874920df585b",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Vert",
        "rules": [
            {
                "t": "set",
                "p": "background",
                "pt": "msg",
                "to": "Green",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 310,
        "y": 2520,
        "wires": [
            [
                "892634c7713b3c24"
            ]
        ]
    },
    {
        "id": "48f1dbc77249a868",
        "type": "junction",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "x": 180,
        "y": 2380,
        "wires": [
            [
                "ed19ceee17086cb8"
            ]
        ]
    },
    {
        "id": "358346d5a7a56d20",
        "type": "function",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Confirm",
        "func": "//only accept OK msg's\nif (msg.payload == 'OK') {\n    msg.payload = \"Stop\";\n    node.send(msg);\n}\nreturn null;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 900,
        "y": 2500,
        "wires": [
            [
                "362ea86b498bedd7",
                "63d4f2ee65ee6dc7"
            ]
        ]
    },
    {
        "id": "4e40e81e2203af73",
        "type": "link in",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "link in 2",
        "links": [
            "69019889fcbf03d7"
        ],
        "x": 375,
        "y": 2080,
        "wires": [
            [
                "819f89938f726858"
            ]
        ]
    },
    {
        "id": "e67374793e8eabdc",
        "type": "ui_toast",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "position": "dialog",
        "displayTime": "3",
        "highlight": "",
        "sendall": true,
        "outputs": 1,
        "ok": "OK",
        "cancel": "Non",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "Eclipse 70",
        "x": 1130,
        "y": 2040,
        "wires": [
            [
                "5a4a021d9b4e3037"
            ]
        ]
    },
    {
        "id": "5a4a021d9b4e3037",
        "type": "function",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Confirm",
        "func": "//only accept OK msg's\nif (msg.payload == 'OK') {\n    msg.payload = \"70\";\n    node.send(msg);\n}\nreturn null;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1300,
        "y": 2040,
        "wires": [
            [
                "426e57dc36c36558"
            ]
        ]
    },
    {
        "id": "426e57dc36c36558",
        "type": "switch",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "filtre info",
        "property": "payload",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "Veuillez activer la vidéo 70",
                "vt": "str"
            },
            {
                "t": "eq",
                "v": "Mauvais mode selectionné",
                "vt": "str"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 2,
        "x": 1460,
        "y": 2040,
        "wires": [
            [],
            []
        ]
    },
    {
        "id": "efb141e14dcf2f06",
        "type": "change",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload.1",
                "pt": "msg",
                "to": "70",
                "tot": "num"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 530,
        "y": 2040,
        "wires": [
            [
                "819f89938f726858"
            ]
        ]
    },
    {
        "id": "b672a2bf2d98bdf9",
        "type": "ui_toast",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "position": "dialog",
        "displayTime": "3",
        "highlight": "",
        "sendall": true,
        "outputs": 1,
        "ok": "Oui",
        "cancel": "Non",
        "raw": false,
        "className": "",
        "topic": "",
        "name": "Eclipse 100",
        "x": 890,
        "y": 2420,
        "wires": [
            [
                "358346d5a7a56d20"
            ]
        ]
    },
    {
        "id": "f3f15ab40a68e7b7",
        "type": "debug",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "debug 3",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 1160,
        "y": 2120,
        "wires": []
    },
    {
        "id": "819f89938f726858",
        "type": "join",
        "z": "3deae33dc9a74eba",
        "g": "803f565b0df49aa4",
        "name": "Check state button",
        "mode": "custom",
        "build": "object",
        "property": "",
        "propertyType": "full",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 730,
        "y": 2080,
        "wires": [
            [
                "f3f15ab40a68e7b7"
            ]
        ]
    },
    {
        "id": "0c820bec3540b682",
        "type": "ui_group",
        "name": "Paramétrages",
        "tab": "cb8fc504867904ea",
        "order": 1,
        "disp": true,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "cb8fc504867904ea",
        "type": "ui_tab",
        "name": "Salle INDIANA",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

But the result is on my output join node. not the input.

Show me what is going into the join node (set the debug nodes to output complete message) and screenshot the join node. I am on my phone.

This is my flow.

So you have a button in gpio on the raspberry who send 0 or 1. he is link in function node to add a msg.topic "check".

the MODE SWITCH function :

if (msg.payload == 0){
    msg.topic = "check";
    /*global.set("MODE","COURT");*/
    return msg;;
}
if (msg.payload == 1){
    msg.topic = "check";
    /*global.set("MODE","LONG");*/
    return msg
}

This function node is link to switch mode to convert 0 and 1 to SHORT and LONG as string., the all are link in text input dashboard to show SHORT or LONG

After i've a button dashboard with switch node to change the payload as number "70". the topic is string "button".

The both node are link in join mode.

When i select short mode and push the button "eclipse 70 min" i've this in my debug mode :

My goal is to have a warning popup if the both condition "70 and COURT" are not true.
If is true, we can play the vidéo.

@azertym - Please don't link to images on external sites, because they often get removed, and then your forum post content will not be available to future visitors
Instead, upload your images directly into the forum using the upload icon (bottom right of the forum post editor, or even copy/paste into the message

@azertym - Please don't link to images on external sites, because they often get removed, and then your forum post content will not be available to future visitors
Instead, upload your images directly into the forum using the upload icon (bottom right of the forum post editor, or even copy/paste into the message

I know @Paul-Reed but since 3 days i can't use the upload option from the website, i'have always an error, i tried with JPG, PNG, or Json and i can't upload nothing ... the upload status stay at 0% during few minutes and crash.

@azertym - I've just checked your forum 'trust level' and you should be able to add images OK.
As a test can you try adding a jpg (any jpg) in a post please, I'll delete it later.

[EDIT] - now resolved via DM

1 Like

I'll assume you are doing the join to join the two messages, You should have a different topic for each msg. Try changing one of the topics and see what you get.

To add an image just drag or paste it into the forum text entry window

@zenofmud

I'll assume you are doing the join to join the two messages, You should have a different topic for each msg. Try changing one of the topics and see what you get.

I've already 2 different topic, i've topic "check" from my rapsberry pi button and topic "button" for my dashboard button. Is not right ?

The code you posted earlier has

if (msg.payload == 0){
    msg.topic = "check";
    /*global.set("MODE","COURT");*/
    return msg;;
}
if (msg.payload == 1){
    msg.topic = "check";
    /*global.set("MODE","LONG");*/
    return msg
}

so both topics are the same.

1 Like

As I asked earlier, add a debug node showing all messages going into the join node.

Also in the full flow you posted the Join node is set to string not key/value