# Variables seem linked somehow

**URL:** <https://discourse.nodered.org/t/variables-seem-linked-somehow/81747>\
**Category:** General\
**Tags:** function-node\
**Created:** [3 October 2023 18:46 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747 "2023-10-03T18:46:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![BrallanH2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brallanh2/32/40801_2.png) [@BrallanH2](https://discourse.nodered.org/u/BrallanH2)\
**Post date:** [3 October 2023 18:46 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/1 "2023-10-03T18:46:07Z")

</div>

What I'm trying to do is:

1. Display a list (array of strings) of Downtime reasons.
2. User (via dashboard) selects the list using a dropdown
3. User selects which member to edit using a dropdown
4. User can update a list member using a Text Input
5. When a list is selected, a file is read and the payload is written to both the DisplayArray, and GlobalArray.

The above works fine. My problem is that my working/display array, and the original are getting updated immediately so the highlighting doesn't work. Only works if I update 1 manually with an inject etc.

1. When the user updates a member, it should only update the DisplayArray so the member is highlighted yellow due to not matching.

2. After a Save and Load, they should match and background is white. I took away updating the original on Save trying to troubleshoot. This issue has eaten about as much time as I should have used on the project.

I'm not sure if I posted my flow correctly:

```auto
[
    {
        "id": "77e990dfb4b955d1",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "3f6beba68d91d549",
        "type": "inject",
        "z": "77e990dfb4b955d1",
        "name": "d",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Display_MT01_Reasons[6]",
        "payloadType": "flow",
        "x": 470,
        "y": 740,
        "wires": [
            [
                "87e96ed2a74185e1"
            ]
        ]
    },
    {
        "id": "87e96ed2a74185e1",
        "type": "debug",
        "z": "77e990dfb4b955d1",
        "name": "dbg",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 630,
        "y": 760,
        "wires": []
    },
    {
        "id": "9053fd2f71c148fc",
        "type": "ui_button",
        "z": "77e990dfb4b955d1",
        "name": "M1 RL Save",
        "group": "67d8728aa87a6a03",
        "order": 2,
        "width": "2",
        "height": "1",
        "passthru": false,
        "label": "Save List",
        "tooltip": "Save",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "true",
        "payloadType": "bool",
        "topic": "1",
        "topicType": "str",
        "x": 310,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "e737423ca3890202",
        "type": "ui_text_input",
        "z": "77e990dfb4b955d1",
        "name": "M1 R In",
        "label": "Enter Correction:",
        "tooltip": "Correct Reason Option Selected",
        "group": "67d8728aa87a6a03",
        "order": 5,
        "width": 0,
        "height": 0,
        "passthru": false,
        "mode": "text",
        "delay": "0",
        "topic": "payload",
        "sendOnBlur": false,
        "className": "",
        "topicType": "msg",
        "x": 300,
        "y": 520,
        "wires": [
            [
                "8b73b0c1d41c47e1"
            ]
        ]
    },
    {
        "id": "2cf82da86946880b",
        "type": "ui_dropdown",
        "z": "77e990dfb4b955d1",
        "name": "M1 S Sel",
        "label": "Select Step",
        "tooltip": "Step Selection",
        "place": "Select option",
        "group": "67d8728aa87a6a03",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "Step 1",
                "value": 1,
                "type": "num"
            },
            {
                "label": "Step 2",
                "value": 2,
                "type": "num"
            },
            {
                "label": "Step 3",
                "value": 3,
                "type": "num"
            },
            {
                "label": "Step 4",
                "value": 4,
                "type": "num"
            },
            {
                "label": "Step 5",
                "value": 5,
                "type": "num"
            },
            {
                "label": "Step 6",
                "value": 6,
                "type": "num"
            },
            {
                "label": "Step 7",
                "value": 7,
                "type": "num"
            },
            {
                "label": "Step 8",
                "value": 8,
                "type": "num"
            },
            {
                "label": "Step 9",
                "value": 9,
                "type": "num"
            },
            {
                "label": "Step 10",
                "value": 10,
                "type": "num"
            },
            {
                "label": "Step 11",
                "value": 11,
                "type": "num"
            },
            {
                "label": "Step 12",
                "value": 12,
                "type": "num"
            },
            {
                "label": "Step 13",
                "value": 13,
                "type": "num"
            },
            {
                "label": "Step 14",
                "value": 14,
                "type": "num"
            },
            {
                "label": "Step 15",
                "value": 15,
                "type": "num"
            },
            {
                "label": "Step 16",
                "value": 16,
                "type": "num"
            },
            {
                "label": "Step 17",
                "value": 17,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 320,
        "y": 360,
        "wires": [
            [
                "7f0adfeeb992c957"
            ]
        ]
    },
    {
        "id": "e4e97e37ba64c47b",
        "type": "ui_dropdown",
        "z": "77e990dfb4b955d1",
        "name": "M1 R Sel",
        "label": "Select Reason",
        "tooltip": "Reason Selection",
        "place": "Select option",
        "group": "67d8728aa87a6a03",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "Reason 1",
                "value": 1,
                "type": "num"
            },
            {
                "label": "Reason 2",
                "value": 2,
                "type": "num"
            },
            {
                "label": "Reason 3",
                "value": 3,
                "type": "num"
            },
            {
                "label": "Reason 4",
                "value": 4,
                "type": "num"
            },
            {
                "label": "Reason 5",
                "value": 5,
                "type": "num"
            },
            {
                "label": "Reason 6",
                "value": 6,
                "type": "num"
            },
            {
                "label": "Reason 7",
                "value": 7,
                "type": "num"
            },
            {
                "label": "Reason 8",
                "value": 8,
                "type": "num"
            },
            {
                "label": "Reason 9",
                "value": 9,
                "type": "num"
            },
            {
                "label": "Reason 10",
                "value": 10,
                "type": "num"
            },
            {
                "label": "Reason 11",
                "value": 11,
                "type": "num"
            },
            {
                "label": "Reason 12",
                "value": 12,
                "type": "num"
            },
            {
                "label": "Reason 13",
                "value": 13,
                "type": "num"
            },
            {
                "label": "Reason 14",
                "value": 14,
                "type": "num"
            },
            {
                "label": "Reason 15",
                "value": 15,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 300,
        "y": 440,
        "wires": [
            [
                "ec1c6b760fae4603"
            ]
        ]
    },
    {
        "id": "619208528a09010f",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "obj to Disp",
        "func": "let Step=global.get(\"MT01_ReasonsStep\");\nlet ReadArray = \"MT01_Step\" + Step + \"_Reasons\";\nlet DisplayArray = \"Display_MT01_Reasons\";\n\nglobal.set(ReadArray, msg.payload);\nflow.set(DisplayArray, msg.payload);\n\nmsg.payload = msg.payload;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1070,
        "y": 340,
        "wires": [
            [
                "6eeb3b50a11c866d"
            ]
        ]
    },
    {
        "id": "ec1c6b760fae4603",
        "type": "change",
        "z": "77e990dfb4b955d1",
        "name": "RE PL",
        "rules": [
            {
                "t": "set",
                "p": "MT01_ReasonEdit",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 450,
        "y": 440,
        "wires": [
            [
                "36a733a16c94f8aa"
            ]
        ]
    },
    {
        "id": "4ee4ac5b7960dfa8",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "obj to File",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nlet n = msg.topic;\nlet Step = global.get(\"MT0\" + n + \"_ReasonsStep\");\nlet MSDR_FN = \"MT0\" + n +\"_Step\" + Step + \"_Reasons\";\nlet CorrectedReason = flow.get(\"Display_MT01_Reasons\");\n\n\n\nmsg.filename = \"D:\\\\PersistentTagValues\\\\MSD_Reasons\\\\MT0\" + n + \"\\\\\" + MSDR_FN + \".csv\";\nmsg.payload=CorrectedReason;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 280,
        "wires": [
            [
                "4c9a015b54f01175"
            ]
        ]
    },
    {
        "id": "6c8ca6ca982f8da6",
        "type": "file",
        "z": "77e990dfb4b955d1",
        "name": "Write Reasons",
        "filename": "",
        "appendNewline": false,
        "createDir": true,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 740,
        "y": 280,
        "wires": [
            [
                "8752a7165e30e3b6"
            ]
        ]
    },
    {
        "id": "e3be9852b9a060cf",
        "type": "inject",
        "z": "77e990dfb4b955d1",
        "name": "1",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "MT01_Step1_Reasons[6]",
        "payloadType": "global",
        "x": 470,
        "y": 780,
        "wires": [
            [
                "87e96ed2a74185e1"
            ]
        ]
    },
    {
        "id": "37bb4231d90c0e2f",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "FNG",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nglobal.set(\"MT01_ReasonsStep\",msg.payload); // Set Step from Dropdown Selection\nlet Reasons_csv = \"MT01_Step\" + msg.payload + \"_Reasons\";\n\nmsg.filename = \"D:\\\\PersistentTagValues\\\\MSD_Reasons\\\\MT01\\\\\" + Reasons_csv + \".csv\";\n\nmsg.payload=msg.payload;\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 590,
        "y": 360,
        "wires": [
            [
                "600a1d8a75bd4cdd"
            ]
        ]
    },
    {
        "id": "600a1d8a75bd4cdd",
        "type": "file in",
        "z": "77e990dfb4b955d1",
        "name": "Load File to OBJ",
        "filename": "",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 750,
        "y": 360,
        "wires": [
            [
                "dc5e61a0bc197797"
            ]
        ]
    },
    {
        "id": "1aada00edf79804a",
        "type": "inject",
        "z": "77e990dfb4b955d1",
        "name": "o",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "MT01_Reasons[5]",
        "payloadType": "global",
        "x": 470,
        "y": 700,
        "wires": [
            [
                "87e96ed2a74185e1"
            ]
        ]
    },
    {
        "id": "f28fd95dda22e4cb",
        "type": "inject",
        "z": "77e990dfb4b955d1",
        "name": "2",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "MT01_Step2_Reasons",
        "payloadType": "global",
        "x": 470,
        "y": 820,
        "wires": [
            [
                "87e96ed2a74185e1"
            ]
        ]
    },
    {
        "id": "4c9a015b54f01175",
        "type": "json",
        "z": "77e990dfb4b955d1",
        "name": "",
        "property": "payload",
        "action": "str",
        "pretty": false,
        "x": 590,
        "y": 280,
        "wires": [
            [
                "6c8ca6ca982f8da6"
            ]
        ]
    },
    {
        "id": "dc5e61a0bc197797",
        "type": "json",
        "z": "77e990dfb4b955d1",
        "name": "",
        "property": "payload",
        "action": "obj",
        "pretty": false,
        "x": 910,
        "y": 360,
        "wires": [
            [
                "619208528a09010f"
            ]
        ]
    },
    {
        "id": "8b73b0c1d41c47e1",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M1-R-Edit",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nlet R = global.get(\"MT01_ReasonEdit\")\nlet TextInput = msg.topic;\nflow.set(\"Display_MT01_Reasons[\" + R + \"]\", TextInput);\n\nmsg.payload=\"\";\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 520,
        "wires": [
            [
                "dc2ee0c889bcd329"
            ]
        ]
    },
    {
        "id": "7f0adfeeb992c957",
        "type": "rbe",
        "z": "77e990dfb4b955d1",
        "name": "chg",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": false,
        "property": "payload",
        "topi": "topic",
        "x": 450,
        "y": 360,
        "wires": [
            [
                "37bb4231d90c0e2f"
            ]
        ]
    },
    {
        "id": "36a733a16c94f8aa",
        "type": "debug",
        "z": "77e990dfb4b955d1",
        "name": "RSel dbg",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 600,
        "y": 440,
        "wires": []
    },
    {
        "id": "6eeb3b50a11c866d",
        "type": "debug",
        "z": "77e990dfb4b955d1",
        "name": "SSel dbg",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 1220,
        "y": 340,
        "wires": []
    },
    {
        "id": "8752a7165e30e3b6",
        "type": "debug",
        "z": "77e990dfb4b955d1",
        "name": "Sv dbg",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "payload",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 960,
        "y": 260,
        "wires": []
    },
    {
        "id": "dc2ee0c889bcd329",
        "type": "debug",
        "z": "77e990dfb4b955d1",
        "name": "IN dbg t",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "topic",
        "targetType": "msg",
        "statusVal": "",
        "statusType": "auto",
        "x": 600,
        "y": 520,
        "wires": []
    },
    {
        "id": "b84bd3be120e2a1f",
        "type": "inject",
        "z": "77e990dfb4b955d1",
        "name": "UpdateTables",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 220,
        "y": 240,
        "wires": [
            [
                "229761a90f15aff6"
            ]
        ]
    },
    {
        "id": "229761a90f15aff6",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M1 Reasons",
        "func": "let Bowl=\"MT01\"; // Setup Setup Setup\nlet R_Count = 15;\nlet Step=global.get(\"MT01_ReasonsStep\");\nlet j = 0;\n\nconst RL_html = [];\nfor (j = 0; j < (R_Count+1); j++) {\n let StoredArray = global.get(Bowl + \"_Step\" + Step + \"_Reasons[\" + j + \"]\");\n let dsp = flow.get(\"Display_\" + Bowl + \"_Reasons[\" + j + \"]\");\n let HTML1 = \"<div style='background-color: \";\n let HTML2=\"\";\n if (StoredArray == dsp){\n HTML2 = \"white\";\n }else{\n HTML2 = \"yellow\"; \n }\n let HTML3 = \"; width:100%; color:black;'>\";\n let HTML4 = dsp;\n let HTML5 = \"</div>\"\n RL_html[j] = HTML1+HTML2+HTML3+HTML4+HTML5;\n}\n\nlet Table = [\n{\n\"Row\":1,\n\"Step\":Step,\n\"Text\":RL_html[1],\n},\n{\n\"Row\":2,\n\"Step\":Step,\n\"Text\":RL_html[2],\n},\n{\n\"Row\":3,\n\"Step\":Step,\n\"Text\":RL_html[3],\n},\n{\n\"Row\":4,\n\"Step\":Step,\n\"Text\":RL_html[4],\n},\n{\n\"Row\":5,\n\"Step\":Step,\n\"Text\":RL_html[5],\n},\n{\n\"Row\":6,\n\"Step\":Step,\n\"Text\":RL_html[6],\n},\n{\n\"Row\":7,\n\"Step\":Step,\n\"Text\":RL_html[7],\n},\n{\n\"Row\":8,\n\"Step\":Step,\n\"Text\":RL_html[8],\n},\n{\n\"Row\":9,\n\"Step\":Step,\n\"Text\":RL_html[9],\n},\n{\n\"Row\":10,\n\"Step\":Step,\n\"Text\":RL_html[10],\n},\n{\n\"Row\":11,\n\"Step\":Step,\n\"Text\":RL_html[11],\n},\n{\n\"Row\":12,\n\"Step\":Step,\n\"Text\":RL_html[12],\n},\n{\n\"Row\":13,\n\"Step\":Step,\n\"Text\":RL_html[13],\n},\n{\n\"Row\":14,\n\n\"Step\":Step,\n\"Text\":RL_html[14],\n},\n{\n\"Row\":15,\n\"Step\":Step,\n\"Text\":RL_html[15],\n}\n];\n\nmsg.payload=Table;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK - \" + j});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 730,
        "y": 80,
        "wires": [
            [
                "67ce9a39c5c5952a"
            ]
        ]
    },
    {
        "id": "67ce9a39c5c5952a",
        "type": "ui_table",
        "z": "77e990dfb4b955d1",
        "group": "67d8728aa87a6a03",
        "name": "MT01_Reasons",
        "order": 1,
        "width": "14",
        "height": "9",
        "columns": [
            {
                "field": "Row",
                "title": "^",
                "width": "1",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Step",
                "title": "Step",
                "width": "65",
                "align": "right",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Text",
                "title": "Reason",
                "width": "500",
                "align": "left",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 1000,
        "y": 80,
        "wires": []
    },
    {
        "id": "67d8728aa87a6a03",
        "type": "ui_group",
        "name": "Reasons",
        "tab": "6933cb9e.7444f4",
        "order": 2,
        "disp": true,
        "width": "14",
        "collapse": true,
        "className": ""
    },
    {
        "id": "6933cb9e.7444f4",
        "type": "ui_tab",
        "name": "MT01",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [3 October 2023 19:44 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/2 "2023-10-03T19:44:35Z")

</div>

Trying out your flow, how do you initialize your data? The `M1 Reasons` function node reads from a global, but it has never been created when I try it.

You really need an initialization flow to set the files, globals and flow variables.

---

<div class="post-metadata">

**Author:** ![BrallanH2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brallanh2/32/40801_2.png) [@BrallanH2](https://discourse.nodered.org/u/BrallanH2)\
**Post date:** [3 October 2023 21:42 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/3 "2023-10-03T21:42:58Z")

</div>

> [@zenofmud](#):
>
> initialization

Thanks. I added the initialization. I added a Change Node to the end of the Step Dropdown Selection and deleted the global.set for my DisplayArray. I need the function to select which Step's array to update. That didn't help until I injected manually into the Change node with a different but valid JSON. After that my highlight color animations work. So then I added back the update both arrays on "SAVE", and it still works. At this point, I'd like to understand what I did and am probably commonly doing wrong. My style is simple. This flow is part of a much larger working application for a paint manufacturing facility.

```auto
[
    {
        "id": "77e990dfb4b955d1",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "9053fd2f71c148fc",
        "type": "ui_button",
        "z": "77e990dfb4b955d1",
        "name": "M1 RL Save",
        "group": "67d8728aa87a6a03",
        "order": 2,
        "width": "2",
        "height": "1",
        "passthru": false,
        "label": "Save List",
        "tooltip": "Save",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "true",
        "payloadType": "bool",
        "topic": "1",
        "topicType": "str",
        "x": 310,
        "y": 280,
        "wires": [
            [
                "4ee4ac5b7960dfa8"
            ]
        ]
    },
    {
        "id": "e737423ca3890202",
        "type": "ui_text_input",
        "z": "77e990dfb4b955d1",
        "name": "M1 R In",
        "label": "Enter Correction:",
        "tooltip": "Correct Reason Option Selected",
        "group": "67d8728aa87a6a03",
        "order": 5,
        "width": 0,
        "height": 0,
        "passthru": false,
        "mode": "text",
        "delay": "0",
        "topic": "payload",
        "sendOnBlur": false,
        "className": "",
        "topicType": "msg",
        "x": 300,
        "y": 520,
        "wires": [
            [
                "8b73b0c1d41c47e1"
            ]
        ]
    },
    {
        "id": "2cf82da86946880b",
        "type": "ui_dropdown",
        "z": "77e990dfb4b955d1",
        "name": "M1 S Sel",
        "label": "Select Step",
        "tooltip": "Step Selection",
        "place": "Select option",
        "group": "67d8728aa87a6a03",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "Step 1",
                "value": 1,
                "type": "num"
            },
            {
                "label": "Step 2",
                "value": 2,
                "type": "num"
            },
            {
                "label": "Step 3",
                "value": 3,
                "type": "num"
            },
            {
                "label": "Step 4",
                "value": 4,
                "type": "num"
            },
            {
                "label": "Step 5",
                "value": 5,
                "type": "num"
            },
            {
                "label": "Step 6",
                "value": 6,
                "type": "num"
            },
            {
                "label": "Step 7",
                "value": 7,
                "type": "num"
            },
            {
                "label": "Step 8",
                "value": 8,
                "type": "num"
            },
            {
                "label": "Step 9",
                "value": 9,
                "type": "num"
            },
            {
                "label": "Step 10",
                "value": 10,
                "type": "num"
            },
            {
                "label": "Step 11",
                "value": 11,
                "type": "num"
            },
            {
                "label": "Step 12",
                "value": 12,
                "type": "num"
            },
            {
                "label": "Step 13",
                "value": 13,
                "type": "num"
            },
            {
                "label": "Step 14",
                "value": 14,
                "type": "num"
            },
            {
                "label": "Step 15",
                "value": 15,
                "type": "num"
            },
            {
                "label": "Step 16",
                "value": 16,
                "type": "num"
            },
            {
                "label": "Step 17",
                "value": 17,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 300,
        "y": 360,
        "wires": [
            [
                "7f0adfeeb992c957"
            ]
        ]
    },
    {
        "id": "e4e97e37ba64c47b",
        "type": "ui_dropdown",
        "z": "77e990dfb4b955d1",
        "name": "M1 R Sel",
        "label": "Select Reason",
        "tooltip": "Reason Selection",
        "place": "Select option",
        "group": "67d8728aa87a6a03",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "Reason 1",
                "value": 1,
                "type": "num"
            },
            {
                "label": "Reason 2",
                "value": 2,
                "type": "num"
            },
            {
                "label": "Reason 3",
                "value": 3,
                "type": "num"
            },
            {
                "label": "Reason 4",
                "value": 4,
                "type": "num"
            },
            {
                "label": "Reason 5",
                "value": 5,
                "type": "num"
            },
            {
                "label": "Reason 6",
                "value": 6,
                "type": "num"
            },
            {
                "label": "Reason 7",
                "value": 7,
                "type": "num"
            },
            {
                "label": "Reason 8",
                "value": 8,
                "type": "num"
            },
            {
                "label": "Reason 9",
                "value": 9,
                "type": "num"
            },
            {
                "label": "Reason 10",
                "value": 10,
                "type": "num"
            },
            {
                "label": "Reason 11",
                "value": 11,
                "type": "num"
            },
            {
                "label": "Reason 12",
                "value": 12,
                "type": "num"
            },
            {
                "label": "Reason 13",
                "value": 13,
                "type": "num"
            },
            {
                "label": "Reason 14",
                "value": 14,
                "type": "num"
            },
            {
                "label": "Reason 15",
                "value": 15,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 300,
        "y": 440,
        "wires": [
            [
                "ec1c6b760fae4603"
            ]
        ]
    },
    {
        "id": "619208528a09010f",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "obj to A[A]",
        "func": "let Step=global.get(\"MT01_ReasonsStep\");\nlet ReadArray = \"MT01_Step\" + Step + \"_Reasons\";\n\nglobal.set(ReadArray, msg.payload);\n\nmsg.payload = msg.payload;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1170,
        "y": 320,
        "wires": [
            []
        ]
    },
    {
        "id": "ec1c6b760fae4603",
        "type": "change",
        "z": "77e990dfb4b955d1",
        "name": "RE PL",
        "rules": [
            {
                "t": "set",
                "p": "MT01_ReasonEdit",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 450,
        "y": 440,
        "wires": [
            []
        ]
    },
    {
        "id": "4ee4ac5b7960dfa8",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "obj to File",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nlet n = msg.topic;\nlet Step = global.get(\"MT0\" + n + \"_ReasonsStep\");\nlet MSDR_FN = \"MT0\" + n +\"_Step\" + Step + \"_Reasons\";\nlet CorrectedReasons = flow.get(\"Display_MT01_Reasons\");\n\nglobal.set(MSDR_FN, CorrectedReasons);\n\nmsg.filename = \"D:\\\\PersistentTagValues\\\\MSD_Reasons\\\\MT0\" + n + \"\\\\\" + MSDR_FN + \".csv\";\nmsg.payload=CorrectedReasons;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 280,
        "wires": [
            [
                "4c9a015b54f01175"
            ]
        ]
    },
    {
        "id": "6c8ca6ca982f8da6",
        "type": "file",
        "z": "77e990dfb4b955d1",
        "name": "Write Reasons",
        "filename": "",
        "appendNewline": false,
        "createDir": true,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 740,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "37bb4231d90c0e2f",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "FNG",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nglobal.set(\"MT01_ReasonsStep\",msg.payload); // Set Step from Dropdown Selection\nlet Reasons_csv = \"MT01_Step\" + msg.payload + \"_Reasons\";\n\nmsg.filename = \"D:\\\\PersistentTagValues\\\\MSD_Reasons\\\\MT01\\\\\" + Reasons_csv + \".csv\";\n\nmsg.payload=msg.payload;\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 590,
        "y": 360,
        "wires": [
            [
                "600a1d8a75bd4cdd"
            ]
        ]
    },
    {
        "id": "600a1d8a75bd4cdd",
        "type": "file in",
        "z": "77e990dfb4b955d1",
        "name": "Load File to OBJ",
        "filename": "",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 750,
        "y": 360,
        "wires": [
            [
                "dc5e61a0bc197797"
            ]
        ]
    },
    {
        "id": "4c9a015b54f01175",
        "type": "json",
        "z": "77e990dfb4b955d1",
        "name": "",
        "property": "payload",
        "action": "str",
        "pretty": false,
        "x": 590,
        "y": 280,
        "wires": [
            [
                "6c8ca6ca982f8da6"
            ]
        ]
    },
    {
        "id": "dc5e61a0bc197797",
        "type": "json",
        "z": "77e990dfb4b955d1",
        "name": "",
        "property": "payload",
        "action": "obj",
        "pretty": false,
        "x": 990,
        "y": 360,
        "wires": [
            [
                "619208528a09010f",
                "0313e8f734b74e7f"
            ]
        ]
    },
    {
        "id": "8b73b0c1d41c47e1",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M1-R-Edit",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nlet R = global.get(\"MT01_ReasonEdit\")\nlet TextInput = msg.topic;\nflow.set(\"Display_MT01_Reasons[\" + R + \"]\", TextInput);\n\nmsg.payload=msg.payload;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 520,
        "wires": [
            []
        ]
    },
    {
        "id": "7f0adfeeb992c957",
        "type": "rbe",
        "z": "77e990dfb4b955d1",
        "name": "chg",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": false,
        "property": "payload",
        "topi": "topic",
        "x": 450,
        "y": 360,
        "wires": [
            [
                "37bb4231d90c0e2f"
            ]
        ]
    },
    {
        "id": "b84bd3be120e2a1f",
        "type": "inject",
        "z": "77e990dfb4b955d1",
        "name": "UpdateTables",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 220,
        "y": 240,
        "wires": [
            [
                "229761a90f15aff6"
            ]
        ]
    },
    {
        "id": "229761a90f15aff6",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M1 Reasons",
        "func": "let Bowl=\"MT01\"; // Setup Setup Setup\nlet R_Count = 15;\nlet Step=global.get(\"MT01_ReasonsStep\");\nlet j = 0;\n\nconst RL_html = [];\nfor (j = 0; j < (R_Count+1); j++) {\n let StoredArray = global.get(Bowl + \"_Step\" + Step + \"_Reasons[\" + j + \"]\");\n let dsp = flow.get(\"Display_\" + Bowl + \"_Reasons[\" + j + \"]\");\n let HTML1 = \"<div style='background-color: \";\n let HTML2=\"\";\n if (StoredArray == dsp){\n HTML2 = \"white\";\n }else{\n HTML2 = \"yellow\"; \n }\n let HTML3 = \"; width:100%; color:black;'>\";\n let HTML4 = dsp;\n let HTML5 = \"</div>\"\n RL_html[j] = HTML1+HTML2+HTML3+HTML4+HTML5;\n}\n\nlet Table = [\n{\n\"Row\":1,\n\"Step\":Step,\n\"Text\":RL_html[1],\n},\n{\n\"Row\":2,\n\"Step\":Step,\n\"Text\":RL_html[2],\n},\n{\n\"Row\":3,\n\"Step\":Step,\n\"Text\":RL_html[3],\n},\n{\n\"Row\":4,\n\"Step\":Step,\n\"Text\":RL_html[4],\n},\n{\n\"Row\":5,\n\"Step\":Step,\n\"Text\":RL_html[5],\n},\n{\n\"Row\":6,\n\"Step\":Step,\n\"Text\":RL_html[6],\n},\n{\n\"Row\":7,\n\"Step\":Step,\n\"Text\":RL_html[7],\n},\n{\n\"Row\":8,\n\"Step\":Step,\n\"Text\":RL_html[8],\n},\n{\n\"Row\":9,\n\"Step\":Step,\n\"Text\":RL_html[9],\n},\n{\n\"Row\":10,\n\"Step\":Step,\n\"Text\":RL_html[10],\n},\n{\n\"Row\":11,\n\"Step\":Step,\n\"Text\":RL_html[11],\n},\n{\n\"Row\":12,\n\"Step\":Step,\n\"Text\":RL_html[12],\n},\n{\n\"Row\":13,\n\"Step\":Step,\n\"Text\":RL_html[13],\n},\n{\n\"Row\":14,\n\n\"Step\":Step,\n\"Text\":RL_html[14],\n},\n{\n\"Row\":15,\n\"Step\":Step,\n\"Text\":RL_html[15],\n}\n];\n\nmsg.payload=Table;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK - \" + j});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 40,
        "wires": [
            [
                "67ce9a39c5c5952a"
            ]
        ]
    },
    {
        "id": "67ce9a39c5c5952a",
        "type": "ui_table",
        "z": "77e990dfb4b955d1",
        "group": "67d8728aa87a6a03",
        "name": "MT01_Reasons",
        "order": 1,
        "width": "14",
        "height": "9",
        "columns": [
            {
                "field": "Row",
                "title": "^",
                "width": "1",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Step",
                "title": "Step",
                "width": "65",
                "align": "right",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Text",
                "title": "Reason",
                "width": "500",
                "align": "left",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 640,
        "y": 40,
        "wires": []
    },
    {
        "id": "0313e8f734b74e7f",
        "type": "change",
        "z": "77e990dfb4b955d1",
        "name": "Set D",
        "rules": [
            {
                "t": "set",
                "p": "Display_MT01_Reasons",
                "pt": "flow",
                "to": "payload",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1210,
        "y": 360,
        "wires": [
            []
        ]
    },
    {
        "id": "67d8728aa87a6a03",
        "type": "ui_group",
        "name": "Reasons",
        "tab": "6933cb9e.7444f4",
        "order": 2,
        "disp": true,
        "width": "14",
        "collapse": true,
        "className": ""
    },
    {
        "id": "6933cb9e.7444f4",
        "type": "ui_tab",
        "name": "MT01",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [4 October 2023 09:10 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/4 "2023-10-04T09:10:10Z")

</div>

I can't help you understand what you did without being able to run your flow. I can't run your flow because there is no data available. There are no global or flow variables, there is no data files to be read in.

If you provide teh data so I can test it, I'll take a look and see if I can give you some advice but without it I can't help you, sorry.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 October 2023 10:34 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/5 "2023-10-04T10:34:44Z")

</div>

> [@BrallanH2](#):
>
> At this point, I'd like to understand what I did and am probably commonly doing wrong

In JavaScript (and many languages), objects (key-val objects/arrays/buffers/etc) are stored by reference. When you set `global.somedata = msg.payload` and `flow.somedata = msg.payload` you are storing a pointer to the original (singular) object. When you edit `global.somedata` you also edit `flow.somedata`

Bearing this in mind for the future will save you some troubles.

There are various ways to solve this. A function node can use:

```auto
global.set(ReadArray, RED.util.cloneMessage(msg.payload))
flow.set(DisplayArray, RED.util.cloneMessage(msg.payload))

```

You can branch flows and use a change node, much like you did.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/a/6a5f3a9a1af6b58592bee897fda32f1a7f5b484b.png)

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/e/de22a5a766c5f5398815f80ce4773993e44b0c5b.png)

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [4 October 2023 11:00 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/6 "2023-10-04T11:00:25Z")

</div>

I was in the mood for a doodle!

My native tongue is .NET - so not sure if the same `PassByRef` behaviour is the same in JS? as it is in .NET

 ![Screenshot 2023-10-04 at 12.00.06](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/6/460ecc0c2151a7e5473487a1e996306e7cd95fbb.png)

---

<div class="post-metadata">

**Author:** ![BrallanH2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brallanh2/32/40801_2.png) [@BrallanH2](https://discourse.nodered.org/u/BrallanH2)\
**Post date:** [4 October 2023 14:40 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/7 "2023-10-04T14:40:27Z")

</div>

I attached a snip of what it looks like initialized.

In this flow, I added initialization to the "START" of each Mixer's Reason List Table generator function. MT02-MT04 arent' really doing anything yet. I really appreciate all the help and fast responses.

My last question is about if the Red.util.cloneMessage can be used on any object or just msg objects like msg.payload?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/8/18fa15c9d0f3e31dac53df067bab24daa7dfbd18.png)

```auto
[
    {
        "id": "77e990dfb4b955d1",
        "type": "tab",
        "label": "Reasons",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "9053fd2f71c148fc",
        "type": "ui_button",
        "z": "77e990dfb4b955d1",
        "name": "M1 RL Save",
        "group": "67d8728aa87a6a03",
        "order": 2,
        "width": "2",
        "height": "1",
        "passthru": false,
        "label": "Save List",
        "tooltip": "Save",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "true",
        "payloadType": "bool",
        "topic": "1",
        "topicType": "str",
        "x": 310,
        "y": 280,
        "wires": [
            [
                "4ee4ac5b7960dfa8"
            ]
        ]
    },
    {
        "id": "e737423ca3890202",
        "type": "ui_text_input",
        "z": "77e990dfb4b955d1",
        "name": "M1 R In",
        "label": "Enter Correction:",
        "tooltip": "Correct Reason Option Selected",
        "group": "67d8728aa87a6a03",
        "order": 5,
        "width": 0,
        "height": 0,
        "passthru": false,
        "mode": "text",
        "delay": "0",
        "topic": "payload",
        "sendOnBlur": false,
        "className": "",
        "topicType": "msg",
        "x": 300,
        "y": 520,
        "wires": [
            [
                "8b73b0c1d41c47e1"
            ]
        ]
    },
    {
        "id": "2cf82da86946880b",
        "type": "ui_dropdown",
        "z": "77e990dfb4b955d1",
        "name": "M1 S Sel",
        "label": "Select Step",
        "tooltip": "Step Selection",
        "place": "Select option",
        "group": "67d8728aa87a6a03",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "Step 1",
                "value": 1,
                "type": "num"
            },
            {
                "label": "Step 2",
                "value": 2,
                "type": "num"
            },
            {
                "label": "Step 3",
                "value": 3,
                "type": "num"
            },
            {
                "label": "Step 4",
                "value": 4,
                "type": "num"
            },
            {
                "label": "Step 5",
                "value": 5,
                "type": "num"
            },
            {
                "label": "Step 6",
                "value": 6,
                "type": "num"
            },
            {
                "label": "Step 7",
                "value": 7,
                "type": "num"
            },
            {
                "label": "Step 8",
                "value": 8,
                "type": "num"
            },
            {
                "label": "Step 9",
                "value": 9,
                "type": "num"
            },
            {
                "label": "Step 10",
                "value": 10,
                "type": "num"
            },
            {
                "label": "Step 11",
                "value": 11,
                "type": "num"
            },
            {
                "label": "Step 12",
                "value": 12,
                "type": "num"
            },
            {
                "label": "Step 13",
                "value": 13,
                "type": "num"
            },
            {
                "label": "Step 14",
                "value": 14,
                "type": "num"
            },
            {
                "label": "Step 15",
                "value": 15,
                "type": "num"
            },
            {
                "label": "Step 16",
                "value": 16,
                "type": "num"
            },
            {
                "label": "Step 17",
                "value": 17,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 300,
        "y": 360,
        "wires": [
            [
                "7f0adfeeb992c957"
            ]
        ]
    },
    {
        "id": "e4e97e37ba64c47b",
        "type": "ui_dropdown",
        "z": "77e990dfb4b955d1",
        "name": "M1 R Sel",
        "label": "Select Reason",
        "tooltip": "Reason Selection",
        "place": "Select option",
        "group": "67d8728aa87a6a03",
        "order": 4,
        "width": 0,
        "height": 0,
        "passthru": false,
        "multiple": false,
        "options": [
            {
                "label": "Reason 1",
                "value": 1,
                "type": "num"
            },
            {
                "label": "Reason 2",
                "value": 2,
                "type": "num"
            },
            {
                "label": "Reason 3",
                "value": 3,
                "type": "num"
            },
            {
                "label": "Reason 4",
                "value": 4,
                "type": "num"
            },
            {
                "label": "Reason 5",
                "value": 5,
                "type": "num"
            },
            {
                "label": "Reason 6",
                "value": 6,
                "type": "num"
            },
            {
                "label": "Reason 7",
                "value": 7,
                "type": "num"
            },
            {
                "label": "Reason 8",
                "value": 8,
                "type": "num"
            },
            {
                "label": "Reason 9",
                "value": 9,
                "type": "num"
            },
            {
                "label": "Reason 10",
                "value": 10,
                "type": "num"
            },
            {
                "label": "Reason 11",
                "value": 11,
                "type": "num"
            },
            {
                "label": "Reason 12",
                "value": 12,
                "type": "num"
            },
            {
                "label": "Reason 13",
                "value": 13,
                "type": "num"
            },
            {
                "label": "Reason 14",
                "value": 14,
                "type": "num"
            },
            {
                "label": "Reason 15",
                "value": 15,
                "type": "num"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 300,
        "y": 440,
        "wires": [
            [
                "ec1c6b760fae4603"
            ]
        ]
    },
    {
        "id": "619208528a09010f",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "obj to A[A]",
        "func": "let Step=global.get(\"MT01_ReasonsStep\");\nlet ReadArray = \"MT01_Step\" + Step + \"_Reasons\";\nlet DisplayArray = \"Display_MT01_Reasons\";\n\nglobal.set(ReadArray, RED.util.cloneMessage(msg.payload))\nflow.set(DisplayArray, RED.util.cloneMessage(msg.payload))\nmsg.payload = msg.payload;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 1150,
        "y": 360,
        "wires": [
            []
        ]
    },
    {
        "id": "ec1c6b760fae4603",
        "type": "change",
        "z": "77e990dfb4b955d1",
        "name": "RE PL",
        "rules": [
            {
                "t": "set",
                "p": "MT01_ReasonEdit",
                "pt": "global",
                "to": "payload",
                "tot": "msg"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 450,
        "y": 440,
        "wires": [
            []
        ]
    },
    {
        "id": "4ee4ac5b7960dfa8",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "obj to File",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nlet n = msg.topic;\nlet Step = global.get(\"MT0\" + n + \"_ReasonsStep\");\nlet MSDR_FN = \"MT0\" + n +\"_Step\" + Step + \"_Reasons\";\nlet CorrectedReasons = flow.get(\"Display_MT0\" + n + \"_Reasons\");\n\nglobal.set(MSDR_FN, CorrectedReasons);\n\nmsg.filename = \"D:\\\\PersistentTagValues\\\\MSD_Reasons\\\\MT0\" + n + \"\\\\\" + MSDR_FN + \".csv\";\nmsg.payload=CorrectedReasons;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 280,
        "wires": [
            [
                "4c9a015b54f01175"
            ]
        ]
    },
    {
        "id": "6c8ca6ca982f8da6",
        "type": "file",
        "z": "77e990dfb4b955d1",
        "name": "Write Reasons",
        "filename": "",
        "appendNewline": false,
        "createDir": true,
        "overwriteFile": "true",
        "encoding": "none",
        "x": 740,
        "y": 280,
        "wires": [
            []
        ]
    },
    {
        "id": "37bb4231d90c0e2f",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "FNG",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nglobal.set(\"MT01_ReasonsStep\",msg.payload); // Set Step from Dropdown Selection\nlet Reasons_csv = \"MT01_Step\" + msg.payload + \"_Reasons\";\n\nmsg.filename = \"D:\\\\PersistentTagValues\\\\MSD_Reasons\\\\MT01\\\\\" + Reasons_csv + \".csv\";\n\nmsg.payload=msg.payload;\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 590,
        "y": 360,
        "wires": [
            [
                "600a1d8a75bd4cdd"
            ]
        ]
    },
    {
        "id": "600a1d8a75bd4cdd",
        "type": "file in",
        "z": "77e990dfb4b955d1",
        "name": "Load File to OBJ",
        "filename": "",
        "format": "utf8",
        "chunk": false,
        "sendError": false,
        "encoding": "none",
        "allProps": false,
        "x": 750,
        "y": 360,
        "wires": [
            [
                "dc5e61a0bc197797"
            ]
        ]
    },
    {
        "id": "4c9a015b54f01175",
        "type": "json",
        "z": "77e990dfb4b955d1",
        "name": "",
        "property": "payload",
        "action": "str",
        "pretty": false,
        "x": 590,
        "y": 280,
        "wires": [
            [
                "6c8ca6ca982f8da6"
            ]
        ]
    },
    {
        "id": "dc5e61a0bc197797",
        "type": "json",
        "z": "77e990dfb4b955d1",
        "name": "",
        "property": "payload",
        "action": "obj",
        "pretty": false,
        "x": 990,
        "y": 360,
        "wires": [
            [
                "619208528a09010f"
            ]
        ]
    },
    {
        "id": "8b73b0c1d41c47e1",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M1-R-Edit",
        "func": "//Set Variables for Mixer Sequence Delay Reasons csv:\nlet R = global.get(\"MT01_ReasonEdit\")\nlet TextInput = msg.topic;\nflow.set(\"Display_MT01_Reasons[\" + R + \"]\", TextInput);\n\nmsg.payload=msg.payload;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK\"});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "",
        "finalize": "",
        "libs": [],
        "x": 460,
        "y": 520,
        "wires": [
            []
        ]
    },
    {
        "id": "7f0adfeeb992c957",
        "type": "rbe",
        "z": "77e990dfb4b955d1",
        "name": "chg",
        "func": "rbe",
        "gap": "",
        "start": "",
        "inout": "out",
        "septopics": false,
        "property": "payload",
        "topi": "topic",
        "x": 450,
        "y": 360,
        "wires": [
            [
                "37bb4231d90c0e2f"
            ]
        ]
    },
    {
        "id": "b84bd3be120e2a1f",
        "type": "inject",
        "z": "77e990dfb4b955d1",
        "name": "UpdateTables",
        "props": [
            {
                "p": "payload"
            },
            {
                "p": "topic",
                "vt": "str"
            }
        ],
        "repeat": "1",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "1",
        "payloadType": "num",
        "x": 200,
        "y": 140,
        "wires": [
            [
                "229761a90f15aff6"
            ]
        ]
    },
    {
        "id": "229761a90f15aff6",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M1 Reasons",
        "func": "let Bowl=\"MT01\"; // Setup Setup Setup\nlet R_Count = 15;\nlet Step=global.get(\"MT01_ReasonsStep\");\nlet j = 0;\n\nconst RL_html = [];\nfor (j = 0; j < (R_Count+1); j++) {\n let StoredArray = global.get(Bowl + \"_Step\" + Step + \"_Reasons[\" + j + \"]\");\n let dsp = flow.get(\"Display_\" + Bowl + \"_Reasons[\" + j + \"]\");\n let HTML1 = \"<div style='background-color: \";\n let HTML2=\"\";\n if (StoredArray == dsp){\n HTML2 = \"white\";\n }else{\n HTML2 = \"yellow\"; \n }\n let HTML3 = \"; width:100%; color:black;'>\";\n let HTML4 = dsp;\n let HTML5 = \"</div>\"\n RL_html[j] = HTML1+HTML2+HTML3+HTML4+HTML5;\n}\n\nlet Table = [\n{\n\"Row\":1,\n\"Step\":Step,\n\"Text\":RL_html[1],\n},\n{\n\"Row\":2,\n\"Step\":Step,\n\"Text\":RL_html[2],\n},\n{\n\"Row\":3,\n\"Step\":Step,\n\"Text\":RL_html[3],\n},\n{\n\"Row\":4,\n\"Step\":Step,\n\"Text\":RL_html[4],\n},\n{\n\"Row\":5,\n\"Step\":Step,\n\"Text\":RL_html[5],\n},\n{\n\"Row\":6,\n\"Step\":Step,\n\"Text\":RL_html[6],\n},\n{\n\"Row\":7,\n\"Step\":Step,\n\"Text\":RL_html[7],\n},\n{\n\"Row\":8,\n\"Step\":Step,\n\"Text\":RL_html[8],\n},\n{\n\"Row\":9,\n\"Step\":Step,\n\"Text\":RL_html[9],\n},\n{\n\"Row\":10,\n\"Step\":Step,\n\"Text\":RL_html[10],\n},\n{\n\"Row\":11,\n\"Step\":Step,\n\"Text\":RL_html[11],\n},\n{\n\"Row\":12,\n\"Step\":Step,\n\"Text\":RL_html[12],\n},\n{\n\"Row\":13,\n\"Step\":Step,\n\"Text\":RL_html[13],\n},\n{\n\"Row\":14,\n\n\"Step\":Step,\n\"Text\":RL_html[14],\n},\n{\n\"Row\":15,\n\"Step\":Step,\n\"Text\":RL_html[15],\n}\n];\n\nmsg.payload=Table;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK - \" + j});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "\nlet Bowl=\"MT01\"; // Setup Setup Setup\nlet initArray = [\n \"MT01_ReasonSelect\",\n \"Reason Text 1\",\n \"Reason Text 2\",\n \"Reason Text 3\",\n \"Reason Text 4\",\n \"Reason Text 5\",\n \"Reason Text 6\",\n \"Reason Text 7\",\n \"Reason Text 8\",\n \"Reason Text 9\",\n \"Reason Text 10\",\n \"Reason Text 11\",\n \"Reason Text 12\",\n \"Reason Text 13\",\n \"Reason Text 14\",\n \"Reason Text 15\"];\n\nglobal.set(\"Display_\" + Bowl +\"_Reasons\", RED.util.cloneMessage(initArray));\n \nfor (var loopinc=0; loopinc<18; loopinc++) { \n global.set(Bowl + \"_Step\" + loopinc +\"_Reasons\", RED.util.cloneMessage(initArray));\n}",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 40,
        "wires": [
            [
                "67ce9a39c5c5952a"
            ]
        ]
    },
    {
        "id": "67ce9a39c5c5952a",
        "type": "ui_table",
        "z": "77e990dfb4b955d1",
        "group": "67d8728aa87a6a03",
        "name": "MT01_Reasons",
        "order": 1,
        "width": "14",
        "height": "9",
        "columns": [
            {
                "field": "Row",
                "title": "^",
                "width": "1",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Step",
                "title": "Step",
                "width": "65",
                "align": "right",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Text",
                "title": "Reason",
                "width": "500",
                "align": "left",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 640,
        "y": 40,
        "wires": []
    },
    {
        "id": "0313e8f734b74e7f",
        "type": "change",
        "z": "77e990dfb4b955d1",
        "d": true,
        "name": "Set D",
        "rules": [
            {
                "t": "set",
                "p": "Display_MT01_Reasons",
                "pt": "flow",
                "to": "payload",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 1230,
        "y": 480,
        "wires": [
            []
        ]
    },
    {
        "id": "01f48a2bded63f72",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M2 Reasons",
        "func": "let Bowl=\"MT02\"; // Setup Setup Setup\nlet R_Count = 15;\nlet Step=global.get(\"MT01_ReasonsStep\");\nlet j = 0;\n\nconst RL_html = [];\nfor (j = 0; j < (R_Count+1); j++) {\n let StoredArray = global.get(Bowl + \"_Step\" + Step + \"_Reasons[\" + j + \"]\");\n let dsp = flow.get(\"Display_\" + Bowl + \"_Reasons[\" + j + \"]\");\n let HTML1 = \"<div style='background-color: \";\n let HTML2=\"\";\n if (StoredArray == dsp){\n HTML2 = \"white\";\n }else{\n HTML2 = \"yellow\"; \n }\n let HTML3 = \"; width:100%; color:black;'>\";\n let HTML4 = dsp;\n let HTML5 = \"</div>\"\n RL_html[j] = HTML1+HTML2+HTML3+HTML4+HTML5;\n}\n\nlet Table = [\n{\n\"Row\":1,\n\"Step\":Step,\n\"Text\":RL_html[1],\n},\n{\n\"Row\":2,\n\"Step\":Step,\n\"Text\":RL_html[2],\n},\n{\n\"Row\":3,\n\"Step\":Step,\n\"Text\":RL_html[3],\n},\n{\n\"Row\":4,\n\"Step\":Step,\n\"Text\":RL_html[4],\n},\n{\n\"Row\":5,\n\"Step\":Step,\n\"Text\":RL_html[5],\n},\n{\n\"Row\":6,\n\"Step\":Step,\n\"Text\":RL_html[6],\n},\n{\n\"Row\":7,\n\"Step\":Step,\n\"Text\":RL_html[7],\n},\n{\n\"Row\":8,\n\"Step\":Step,\n\"Text\":RL_html[8],\n},\n{\n\"Row\":9,\n\"Step\":Step,\n\"Text\":RL_html[9],\n},\n{\n\"Row\":10,\n\"Step\":Step,\n\"Text\":RL_html[10],\n},\n{\n\"Row\":11,\n\"Step\":Step,\n\"Text\":RL_html[11],\n},\n{\n\"Row\":12,\n\"Step\":Step,\n\"Text\":RL_html[12],\n},\n{\n\"Row\":13,\n\"Step\":Step,\n\"Text\":RL_html[13],\n},\n{\n\"Row\":14,\n\n\"Step\":Step,\n\"Text\":RL_html[14],\n},\n{\n\"Row\":15,\n\"Step\":Step,\n\"Text\":RL_html[15],\n}\n];\n\nmsg.payload=Table;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK - \" + j});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "\nlet Bowl=\"MT02\"; // Setup Setup Setup\nlet initArray = [\n \"MT01_ReasonSelect\",\n \"Reason Text 1\",\n \"Reason Text 2\",\n \"Reason Text 3\",\n \"Reason Text 4\",\n \"Reason Text 5\",\n \"Reason Text 6\",\n \"Reason Text 7\",\n \"Reason Text 8\",\n \"Reason Text 9\",\n \"Reason Text 10\",\n \"Reason Text 11\",\n \"Reason Text 12\",\n \"Reason Text 13\",\n \"Reason Text 14\",\n \"Reason Text 15\"];\n\nglobal.set(\"Display_\" + Bowl +\"_Reasons\", RED.util.cloneMessage(initArray));\n \nfor (var loopinc=0; loopinc<18; loopinc++) { \n global.set(Bowl + \"_Step\" + loopinc +\"_Reasons\", RED.util.cloneMessage(initArray));\n}",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 100,
        "wires": [
            [
                "843751b9a9bcc502"
            ]
        ]
    },
    {
        "id": "843751b9a9bcc502",
        "type": "ui_table",
        "z": "77e990dfb4b955d1",
        "group": "d624a4f63db30d79",
        "name": "MT02_Reasons",
        "order": 1,
        "width": "14",
        "height": "9",
        "columns": [
            {
                "field": "Row",
                "title": "^",
                "width": "1",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Step",
                "title": "Step",
                "width": "65",
                "align": "right",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Text",
                "title": "Reason",
                "width": "500",
                "align": "left",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 640,
        "y": 100,
        "wires": []
    },
    {
        "id": "548636b8ba6506a2",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M3 Reasons",
        "func": "let Bowl=\"MT03\"; // Setup Setup Setup\nlet R_Count = 15;\nlet Step=global.get(\"MT01_ReasonsStep\");\nlet j = 0;\n\nconst RL_html = [];\nfor (j = 0; j < (R_Count+1); j++) {\n let StoredArray = global.get(Bowl + \"_Step\" + Step + \"_Reasons[\" + j + \"]\");\n let dsp = flow.get(\"Display_\" + Bowl + \"_Reasons[\" + j + \"]\");\n let HTML1 = \"<div style='background-color: \";\n let HTML2=\"\";\n if (StoredArray == dsp){\n HTML2 = \"white\";\n }else{\n HTML2 = \"yellow\"; \n }\n let HTML3 = \"; width:100%; color:black;'>\";\n let HTML4 = dsp;\n let HTML5 = \"</div>\"\n RL_html[j] = HTML1+HTML2+HTML3+HTML4+HTML5;\n}\n\nlet Table = [\n{\n\"Row\":1,\n\"Step\":Step,\n\"Text\":RL_html[1],\n},\n{\n\"Row\":2,\n\"Step\":Step,\n\"Text\":RL_html[2],\n},\n{\n\"Row\":3,\n\"Step\":Step,\n\"Text\":RL_html[3],\n},\n{\n\"Row\":4,\n\"Step\":Step,\n\"Text\":RL_html[4],\n},\n{\n\"Row\":5,\n\"Step\":Step,\n\"Text\":RL_html[5],\n},\n{\n\"Row\":6,\n\"Step\":Step,\n\"Text\":RL_html[6],\n},\n{\n\"Row\":7,\n\"Step\":Step,\n\"Text\":RL_html[7],\n},\n{\n\"Row\":8,\n\"Step\":Step,\n\"Text\":RL_html[8],\n},\n{\n\"Row\":9,\n\"Step\":Step,\n\"Text\":RL_html[9],\n},\n{\n\"Row\":10,\n\"Step\":Step,\n\"Text\":RL_html[10],\n},\n{\n\"Row\":11,\n\"Step\":Step,\n\"Text\":RL_html[11],\n},\n{\n\"Row\":12,\n\"Step\":Step,\n\"Text\":RL_html[12],\n},\n{\n\"Row\":13,\n\"Step\":Step,\n\"Text\":RL_html[13],\n},\n{\n\"Row\":14,\n\n\"Step\":Step,\n\"Text\":RL_html[14],\n},\n{\n\"Row\":15,\n\"Step\":Step,\n\"Text\":RL_html[15],\n}\n];\n\nmsg.payload=Table;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK - \" + j});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "\nlet Bowl=\"MT03\"; // Setup Setup Setup\nlet initArray = [\n \"MT01_ReasonSelect\",\n \"Reason Text 1\",\n \"Reason Text 2\",\n \"Reason Text 3\",\n \"Reason Text 4\",\n \"Reason Text 5\",\n \"Reason Text 6\",\n \"Reason Text 7\",\n \"Reason Text 8\",\n \"Reason Text 9\",\n \"Reason Text 10\",\n \"Reason Text 11\",\n \"Reason Text 12\",\n \"Reason Text 13\",\n \"Reason Text 14\",\n \"Reason Text 15\"];\n\nglobal.set(\"Display_\" + Bowl +\"_Reasons\", RED.util.cloneMessage(initArray));\n \nfor (var loopinc=0; loopinc<18; loopinc++) { \n global.set(Bowl + \"_Step\" + loopinc +\"_Reasons\", RED.util.cloneMessage(initArray));\n}",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 160,
        "wires": [
            [
                "d81da57d9be0cafd"
            ]
        ]
    },
    {
        "id": "d81da57d9be0cafd",
        "type": "ui_table",
        "z": "77e990dfb4b955d1",
        "group": "0a6fa87510a7bbbb",
        "name": "MT03_Reasons",
        "order": 1,
        "width": "14",
        "height": "9",
        "columns": [
            {
                "field": "Row",
                "title": "^",
                "width": "1",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Step",
                "title": "Step",
                "width": "65",
                "align": "right",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Text",
                "title": "Reason",
                "width": "500",
                "align": "left",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 640,
        "y": 160,
        "wires": []
    },
    {
        "id": "8d15c814b643db90",
        "type": "function",
        "z": "77e990dfb4b955d1",
        "name": "M4 Reasons",
        "func": "let Bowl=\"MT04\"; // Setup Setup Setup\nlet R_Count = 15;\nlet Step=global.get(\"MT01_ReasonsStep\");\nlet j = 0;\n\nconst RL_html = [];\nfor (j = 0; j < (R_Count+1); j++) {\n let StoredArray = global.get(Bowl + \"_Step\" + Step + \"_Reasons[\" + j + \"]\");\n let dsp = flow.get(\"Display_\" + Bowl + \"_Reasons[\" + j + \"]\");\n let HTML1 = \"<div style='background-color: \";\n let HTML2=\"\";\n if (StoredArray == dsp){\n HTML2 = \"white\";\n }else{\n HTML2 = \"yellow\"; \n }\n let HTML3 = \"; width:100%; color:black;'>\";\n let HTML4 = dsp;\n let HTML5 = \"</div>\"\n RL_html[j] = HTML1+HTML2+HTML3+HTML4+HTML5;\n}\n\nlet Table = [\n{\n\"Row\":1,\n\"Step\":Step,\n\"Text\":RL_html[1],\n},\n{\n\"Row\":2,\n\"Step\":Step,\n\"Text\":RL_html[2],\n},\n{\n\"Row\":3,\n\"Step\":Step,\n\"Text\":RL_html[3],\n},\n{\n\"Row\":4,\n\"Step\":Step,\n\"Text\":RL_html[4],\n},\n{\n\"Row\":5,\n\"Step\":Step,\n\"Text\":RL_html[5],\n},\n{\n\"Row\":6,\n\"Step\":Step,\n\"Text\":RL_html[6],\n},\n{\n\"Row\":7,\n\"Step\":Step,\n\"Text\":RL_html[7],\n},\n{\n\"Row\":8,\n\"Step\":Step,\n\"Text\":RL_html[8],\n},\n{\n\"Row\":9,\n\"Step\":Step,\n\"Text\":RL_html[9],\n},\n{\n\"Row\":10,\n\"Step\":Step,\n\"Text\":RL_html[10],\n},\n{\n\"Row\":11,\n\"Step\":Step,\n\"Text\":RL_html[11],\n},\n{\n\"Row\":12,\n\"Step\":Step,\n\"Text\":RL_html[12],\n},\n{\n\"Row\":13,\n\"Step\":Step,\n\"Text\":RL_html[13],\n},\n{\n\"Row\":14,\n\n\"Step\":Step,\n\"Text\":RL_html[14],\n},\n{\n\"Row\":15,\n\"Step\":Step,\n\"Text\":RL_html[15],\n}\n];\n\nmsg.payload=Table;\n\nnode.status({fill:\"blue\",shape:\"ring\",text:\"OK - \" + j});\nreturn msg;",
        "outputs": 1,
        "noerr": 0,
        "initialize": "\nlet Bowl=\"MT04\"; // Setup Setup Setup\nlet initArray = [\n \"MT01_ReasonSelect\",\n \"Reason Text 1\",\n \"Reason Text 2\",\n \"Reason Text 3\",\n \"Reason Text 4\",\n \"Reason Text 5\",\n \"Reason Text 6\",\n \"Reason Text 7\",\n \"Reason Text 8\",\n \"Reason Text 9\",\n \"Reason Text 10\",\n \"Reason Text 11\",\n \"Reason Text 12\",\n \"Reason Text 13\",\n \"Reason Text 14\",\n \"Reason Text 15\"];\n\nglobal.set(\"Display_\" + Bowl +\"_Reasons\", RED.util.cloneMessage(initArray));\n \nfor (var loopinc=0; loopinc<18; loopinc++) { \n global.set(Bowl + \"_Step\" + loopinc +\"_Reasons\", RED.util.cloneMessage(initArray));\n}",
        "finalize": "",
        "libs": [],
        "x": 450,
        "y": 220,
        "wires": [
            [
                "483dc5dde1856181"
            ]
        ]
    },
    {
        "id": "483dc5dde1856181",
        "type": "ui_table",
        "z": "77e990dfb4b955d1",
        "group": "4288fb55eebc0f65",
        "name": "MT04_Reasons",
        "order": 1,
        "width": "14",
        "height": "9",
        "columns": [
            {
                "field": "Row",
                "title": "^",
                "width": "1",
                "align": "left",
                "formatter": "plaintext",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Step",
                "title": "Step",
                "width": "65",
                "align": "right",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            },
            {
                "field": "Text",
                "title": "Reason",
                "width": "500",
                "align": "left",
                "formatter": "html",
                "formatterParams": {
                    "target": "_blank"
                }
            }
        ],
        "outputs": 0,
        "cts": false,
        "x": 640,
        "y": 220,
        "wires": []
    },
    {
        "id": "67d8728aa87a6a03",
        "type": "ui_group",
        "name": "Reasons",
        "tab": "6933cb9e.7444f4",
        "order": 2,
        "disp": true,
        "width": "14",
        "collapse": true,
        "className": ""
    },
    {
        "id": "d624a4f63db30d79",
        "type": "ui_group",
        "name": "Reasons",
        "tab": "9e77b36.07f525",
        "order": 3,
        "disp": true,
        "width": "14",
        "collapse": false,
        "className": ""
    },
    {
        "id": "0a6fa87510a7bbbb",
        "type": "ui_group",
        "name": "Reasons",
        "tab": "3a187968.f13eb6",
        "order": 3,
        "disp": true,
        "width": "14",
        "collapse": false,
        "className": ""
    },
    {
        "id": "4288fb55eebc0f65",
        "type": "ui_group",
        "name": "Reasons",
        "tab": "3d493148.11201e",
        "order": 3,
        "disp": true,
        "width": "14",
        "collapse": false,
        "className": ""
    },
    {
        "id": "6933cb9e.7444f4",
        "type": "ui_tab",
        "name": "MT01",
        "icon": "dashboard",
        "order": 2,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "9e77b36.07f525",
        "type": "ui_tab",
        "name": "MT02",
        "icon": "dashboard",
        "order": 3,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "3a187968.f13eb6",
        "type": "ui_tab",
        "name": "MT03",
        "icon": "dashboard",
        "order": 4,
        "disabled": false,
        "hidden": false
    },
    {
        "id": "3d493148.11201e",
        "type": "ui_tab",
        "name": "MT04",
        "icon": "dashboard",
        "order": 5,
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 October 2023 15:30 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/8 "2023-10-04T15:30:58Z")

</div>

> [@BrallanH2](#):
>
> My last question is about if the Red.util.cloneMessage can be used on any object or just msg objects like msg.payload

Any object

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 October 2023 15:31 UTC](https://discourse.nodered.org/t/variables-seem-linked-somehow/81747/9 "2023-10-18T15:31:05Z")

</div>

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