# Reset dropdown in dashboard with msg.reset while preserving it's previous value

**URL:** <https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734>\
**Category:** Dashboard\
**Created:** [25 April 2022 01:14 UTC](https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734 "2022-04-25T01:14:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![nightmareside15](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nightmareside15/32/56176_2.png) [@nightmareside15](https://discourse.nodered.org/u/nightmareside15)\
**Post date:** [25 April 2022 01:14 UTC](https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734/1 "2022-04-25T01:14:45Z")

</div>

Hello . Is it possible to reset dropdown node with msg.reset, just like how we did it with text input node? I want it to preserve it's previous msg.payload after each time the value goes to the join node.

This is the first time I input the data, with all the parameter recently inputted:

 ![pic1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/e/2ed1c9efdf6f85d8c6548972be274ac97c088ebc.png)

After that, I tried to change the dropdown value, then push the button and this is how it goes:

 ![pic2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/3/b3d70539e3ee7fa8af231308c6f5ecd7246bafd7.png)  
The join node immediately receive text input, with it's previous value.

However, when I tried to only change the text value, and then press the button, the join node send nothing. This indicate the msg.reset doesn't work the same as text input.

 ![pic3](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/0/300632790aff8a8028cab928f02ebf8499216333.png)

Is there anything I miss on this case? Or did you guys have a better ideas to do this? I also avoid using subsequent option since there will be time I use timestamp every second, but maybe you guys know how to get over it with some tricks so feel free to share it. Thank you very much

```auto
[
    {
        "id": "0f5d167769d53171",
        "type": "tab",
        "label": "Flow 1",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "7833a85dffc90b56",
        "type": "ui_dropdown",
        "z": "0f5d167769d53171",
        "name": "",
        "label": "",
        "tooltip": "",
        "place": "Select option",
        "group": "7c12f85c9c65c62f",
        "order": 2,
        "width": 0,
        "height": 0,
        "passthru": true,
        "multiple": false,
        "options": [
            {
                "label": "1",
                "value": "value1",
                "type": "str"
            },
            {
                "label": "2",
                "value": "value2",
                "type": "str"
            }
        ],
        "payload": "",
        "topic": "topic",
        "topicType": "msg",
        "className": "",
        "x": 160,
        "y": 40,
        "wires": [
            [
                "279812b4b328ae27"
            ]
        ]
    },
    {
        "id": "e0a5e02062fc1e3a",
        "type": "ui_text_input",
        "z": "0f5d167769d53171",
        "name": "",
        "label": "",
        "tooltip": "",
        "group": "7c12f85c9c65c62f",
        "order": 1,
        "width": 0,
        "height": 0,
        "passthru": true,
        "mode": "text",
        "delay": "0",
        "topic": "topic",
        "sendOnBlur": true,
        "className": "",
        "topicType": "msg",
        "x": 160,
        "y": 200,
        "wires": [
            [
                "53dbcd14344deb58"
            ]
        ]
    },
    {
        "id": "a68cfc105b2d9bdc",
        "type": "join",
        "z": "0f5d167769d53171",
        "name": "",
        "mode": "custom",
        "build": "object",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "\\n",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "3",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 570,
        "y": 140,
        "wires": [
            [
                "3d132138993efd1a",
                "b153696f302252d2"
            ]
        ]
    },
    {
        "id": "3d132138993efd1a",
        "type": "change",
        "z": "0f5d167769d53171",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "payload",
                "pt": "msg",
                "to": "reset",
                "tot": "msg",
                "dc": true
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 720,
        "y": 200,
        "wires": [
            [
                "e0a5e02062fc1e3a",
                "7833a85dffc90b56"
            ]
        ]
    },
    {
        "id": "b153696f302252d2",
        "type": "debug",
        "z": "0f5d167769d53171",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 730,
        "y": 100,
        "wires": []
    },
    {
        "id": "782190ab1cbe319e",
        "type": "ui_button",
        "z": "0f5d167769d53171",
        "name": "",
        "group": "7c12f85c9c65c62f",
        "order": 3,
        "width": 0,
        "height": 0,
        "passthru": false,
        "label": "button",
        "tooltip": "",
        "color": "",
        "bgcolor": "",
        "className": "",
        "icon": "",
        "payload": "",
        "payloadType": "str",
        "topic": "topic",
        "topicType": "msg",
        "x": 250,
        "y": 260,
        "wires": [
            [
                "d01550a22653970f"
            ]
        ]
    },
    {
        "id": "d01550a22653970f",
        "type": "change",
        "z": "0f5d167769d53171",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "button",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 430,
        "y": 260,
        "wires": [
            [
                "a68cfc105b2d9bdc"
            ]
        ]
    },
    {
        "id": "53dbcd14344deb58",
        "type": "change",
        "z": "0f5d167769d53171",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "text",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 370,
        "y": 160,
        "wires": [
            [
                "a68cfc105b2d9bdc"
            ]
        ]
    },
    {
        "id": "279812b4b328ae27",
        "type": "change",
        "z": "0f5d167769d53171",
        "name": "",
        "rules": [
            {
                "t": "set",
                "p": "topic",
                "pt": "msg",
                "to": "dropdown",
                "tot": "str"
            }
        ],
        "action": "",
        "property": "",
        "from": "",
        "to": "",
        "reg": false,
        "x": 370,
        "y": 40,
        "wires": [
            [
                "a68cfc105b2d9bdc"
            ]
        ]
    },
    {
        "id": "7c12f85c9c65c62f",
        "type": "ui_group",
        "name": "Default",
        "tab": "bdf6348413fab83a",
        "order": 1,
        "disp": false,
        "width": "6",
        "collapse": false,
        "className": ""
    },
    {
        "id": "bdf6348413fab83a",
        "type": "ui_tab",
        "name": "Home",
        "icon": "dashboard",
        "disabled": false,
        "hidden": false
    }
]

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 April 2022 07:36 UTC](https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734/2 "2022-04-25T07:36:53Z")

</div>

you should be able to feed in msg.payload with blank value to reset the ui nodes.  
e.g.

```auto
[{"id":"7833a85dffc90b56","type":"ui_dropdown","z":"0f5d167769d53171","name":"","label":"","tooltip":"","place":"Select option","group":"7c12f85c9c65c62f","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"1","value":"value1","type":"str"},{"label":"2","value":"value2","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":160,"y":40,"wires":[["279812b4b328ae27","7eae3e3.c4a24c"]]},{"id":"dd7dcb5b.2ba06","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":260,"wires":[["e0a5e02062fc1e3a","7833a85dffc90b56"]]},{"id":"279812b4b328ae27","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"dropdown","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":40,"wires":[["a68cfc105b2d9bdc"]]},{"id":"7eae3e3.c4a24c","type":"debug","z":"0f5d167769d53171","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":660,"y":40,"wires":[]},{"id":"a68cfc105b2d9bdc","type":"join","z":"0f5d167769d53171","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":570,"y":140,"wires":[["b153696f302252d2","dd7dcb5b.2ba06"]]},{"id":"e0a5e02062fc1e3a","type":"ui_text_input","z":"0f5d167769d53171","name":"","label":"","tooltip":"","group":"7c12f85c9c65c62f","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":"0","topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":160,"y":200,"wires":[["53dbcd14344deb58"]]},{"id":"d01550a22653970f","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"button","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":260,"wires":[["a68cfc105b2d9bdc"]]},{"id":"53dbcd14344deb58","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"text","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":160,"wires":[["a68cfc105b2d9bdc"]]},{"id":"b153696f302252d2","type":"debug","z":"0f5d167769d53171","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":100,"wires":[]},{"id":"782190ab1cbe319e","type":"ui_button","z":"0f5d167769d53171","name":"","group":"7c12f85c9c65c62f","order":3,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":250,"y":260,"wires":[["d01550a22653970f"]]},{"id":"7c12f85c9c65c62f","type":"ui_group","name":"Default","tab":"bdf6348413fab83a","order":1,"disp":false,"width":"6","collapse":false,"className":""},{"id":"bdf6348413fab83a","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

<div class="post-metadata">

**Author:** ![nightmareside15](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nightmareside15/32/56176_2.png) [@nightmareside15](https://discourse.nodered.org/u/nightmareside15)\
**Post date:** [25 April 2022 08:26 UTC](https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734/3 "2022-04-25T08:26:03Z")

</div>

Thanks for reply, but unfortunately thats not what I would like to do. Maybe i wasn't clear enough. What I want is using the same value as the previous one without selecting / clicking it once again ( just like picture #2). The msg.reset rewrite the value exactly as it is into join node once more, and I would like this msg.reset also affecting the dropdown node.  
In the end, I believe this should allow me to press the button as much as I want to give join node a complete topic, without inserting anything to either dropdown or text node more than one time. This is pretty much how i wanted it to be ( with exchanging dropdown with another text input node ):

 ![target](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/d/7d950435a85ca23da6caa4592e58d85280685239.png)

That 2nd output from join node only done by using the button.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [25 April 2022 08:46 UTC](https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734/4 "2022-04-25T08:46:39Z")

</div>

then just feed the payloads back to the ui nodes  
e.g

```auto
[{"id":"7833a85dffc90b56","type":"ui_dropdown","z":"0f5d167769d53171","name":"","label":"","tooltip":"","place":"Select option","group":"7c12f85c9c65c62f","order":2,"width":0,"height":0,"passthru":false,"multiple":false,"options":[{"label":"1","value":"value1","type":"str"},{"label":"2","value":"value2","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":160,"y":40,"wires":[["279812b4b328ae27","7eae3e3.c4a24c"]]},{"id":"279812b4b328ae27","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"dropdown","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":40,"wires":[["a68cfc105b2d9bdc","7833a85dffc90b56"]]},{"id":"7eae3e3.c4a24c","type":"debug","z":"0f5d167769d53171","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":660,"y":40,"wires":[]},{"id":"a68cfc105b2d9bdc","type":"join","z":"0f5d167769d53171","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":570,"y":140,"wires":[["b153696f302252d2"]]},{"id":"d01550a22653970f","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"button","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":260,"wires":[["a68cfc105b2d9bdc"]]},{"id":"53dbcd14344deb58","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"text","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":160,"wires":[["a68cfc105b2d9bdc","e0a5e02062fc1e3a"]]},{"id":"b153696f302252d2","type":"debug","z":"0f5d167769d53171","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":100,"wires":[]},{"id":"782190ab1cbe319e","type":"ui_button","z":"0f5d167769d53171","name":"","group":"7c12f85c9c65c62f","order":3,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":250,"y":260,"wires":[["d01550a22653970f"]]},{"id":"e0a5e02062fc1e3a","type":"ui_text_input","z":"0f5d167769d53171","name":"","label":"","tooltip":"","group":"7c12f85c9c65c62f","order":1,"width":0,"height":0,"passthru":false,"mode":"text","delay":"0","topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":160,"y":200,"wires":[["53dbcd14344deb58"]]},{"id":"7c12f85c9c65c62f","type":"ui_group","name":"Default","tab":"bdf6348413fab83a","order":1,"disp":false,"width":"6","collapse":false,"className":""},{"id":"bdf6348413fab83a","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

Making sure to deselect pass through option

Or if you want to keep pass through move the payloads back to msg. payload after the join node.  
e.g.

```auto
[{"id":"7833a85dffc90b56","type":"ui_dropdown","z":"0f5d167769d53171","name":"","label":"","tooltip":"","place":"Select option","group":"7c12f85c9c65c62f","order":2,"width":0,"height":0,"passthru":true,"multiple":false,"options":[{"label":"value1","value":"1","type":"str"},{"label":"value2","value":"2","type":"str"}],"payload":"","topic":"topic","topicType":"msg","className":"","x":160,"y":40,"wires":[["279812b4b328ae27","7eae3e3.c4a24c"]]},{"id":"433a45e1.247374","type":"trigger","z":"0f5d167769d53171","name":"","op1":" ","op2":"","op1type":"str","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":970,"y":180,"wires":[["7833a85dffc90b56"]]},{"id":"279812b4b328ae27","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"dropdown","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":40,"wires":[["a68cfc105b2d9bdc"]]},{"id":"7eae3e3.c4a24c","type":"debug","z":"0f5d167769d53171","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":660,"y":40,"wires":[]},{"id":"39dca13f.034a7e","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.dropdown","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":180,"wires":[["433a45e1.247374"]]},{"id":"a68cfc105b2d9bdc","type":"join","z":"0f5d167769d53171","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"3","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":570,"y":140,"wires":[["b153696f302252d2","39dca13f.034a7e","222c1a76.eb0816"]]},{"id":"d01550a22653970f","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"button","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":430,"y":260,"wires":[["a68cfc105b2d9bdc"]]},{"id":"53dbcd14344deb58","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"text","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":370,"y":160,"wires":[["a68cfc105b2d9bdc"]]},{"id":"b153696f302252d2","type":"debug","z":"0f5d167769d53171","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":100,"wires":[]},{"id":"222c1a76.eb0816","type":"change","z":"0f5d167769d53171","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"payload.text","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":750,"y":220,"wires":[["c61b0329.cb872"]]},{"id":"782190ab1cbe319e","type":"ui_button","z":"0f5d167769d53171","name":"","group":"7c12f85c9c65c62f","order":3,"width":0,"height":0,"passthru":false,"label":"button","tooltip":"","color":"","bgcolor":"","className":"","icon":"","payload":"","payloadType":"str","topic":"topic","topicType":"msg","x":250,"y":260,"wires":[["d01550a22653970f"]]},{"id":"e0a5e02062fc1e3a","type":"ui_text_input","z":"0f5d167769d53171","name":"","label":"","tooltip":"","group":"7c12f85c9c65c62f","order":1,"width":0,"height":0,"passthru":true,"mode":"text","delay":"0","topic":"topic","sendOnBlur":true,"className":"","topicType":"msg","x":160,"y":200,"wires":[["53dbcd14344deb58"]]},{"id":"c61b0329.cb872","type":"trigger","z":"0f5d167769d53171","name":"","op1":" ","op2":"","op1type":"str","op2type":"pay","duration":"250","extend":false,"overrideDelay":false,"units":"ms","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":990,"y":220,"wires":[["e0a5e02062fc1e3a"]]},{"id":"7c12f85c9c65c62f","type":"ui_group","name":"Default","tab":"bdf6348413fab83a","order":1,"disp":false,"width":"6","collapse":false,"className":""},{"id":"bdf6348413fab83a","type":"ui_tab","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

As you can not send the same value twice you would need to a trigger nodes to, first send a new value then old value.

---

<div class="post-metadata">

**Author:** ![nightmareside15](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nightmareside15/32/56176_2.png) [@nightmareside15](https://discourse.nodered.org/u/nightmareside15)\
**Post date:** [26 April 2022 02:00 UTC](https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734/5 "2022-04-26T02:00:05Z")

</div>

Once again, you help me! Thank you so much!

---

<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:** [10 May 2022 02:00 UTC](https://discourse.nodered.org/t/reset-dropdown-in-dashboard-with-msg-reset-while-preserving-its-previous-value/61734/6 "2022-05-10T02:00:53Z")

</div>

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