# Ui\_dropdown no reaction to input payload if passing through

**URL:** https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329
**Category:** Dashboard
**Created:** [31 December 2020 14:59 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329 "2020-12-31T14:59:24Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![philbowles](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/philbowles/32/34429_2.png) [@philbowles](https://discourse.nodered.org/u/philbowles)
#### Post date: [31 December 2020 14:59 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/1 "2020-12-31T14:59:24Z")

</div>

NODE-RED: v1.2.6 on Raspi Model 3B running Buster  
ui\_dashboard version: 2.26.1

Documentation says:  
" Setting `msg.payload` will pre-select the value in the dropdown."

Nowehere can I find the fact that this only works if the user does NOT tick " If `msg` arrives on input, pass through to output". If that option is selected then all msg.payload input is ignored, making it impossible to reset the dropdown programtically.

Is this by design or is it a bug? What am I missing?

---

<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: [30 January 2021 14:59 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/2 "2021-01-30T14:59:30Z")

</div>

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

---

<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: [13 July 2021 11:40 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/3 "2021-07-13T11:40:31Z")

</div>



---

<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: [13 July 2021 11:44 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/4 "2021-07-13T11:44:43Z")

</div>

NR 1.3.5  
Dashboard v2.29.1 and v2.30.0

While trying something for a project I'm working on, I hit this same issue, the  
`If msg arrives on input, pass through to output: `  
option seems to be ignored.

Taking a look at the code and comparing it to ui\_text, I can not figure out how the passthru works.

@dceejay, any hints or pointers to what I should look for in the ui\_dropdown's code?

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [13 July 2021 12:18 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/5 "2021-07-13T12:18:43Z")

</div>

Which way doesn't it work ? do you have a small example ?

---

<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: [13 July 2021 14:11 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/6 "2021-07-13T14:11:02Z")

</div>

Here is a small flow showing the issue

````auto
[{ "id": "c0cbd894.a69f48", "type": "inject", "z": "170f950f.540b8b", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" }, { "p": "object", "v": "[{\"Camera-1\":\"cam1\"},{\"Camera-2\":\"cam2\"},{\"Camera-3\":\"cam3\"},{\"Camera-4\":\"cam4\"},{\"Show media 2\":\"med2\"},{\"Show media 5\":\"med5\"}]", "vt": "json" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "Camera-2", "payloadType": "str", "x": 640, "y": 580, "wires": [[ "e05207bf.b24e1"] ] }, { "id": "e05207bf.b24e1", "type": "ui_dropdown", "z": "170f950f.540b8b", "name": "Main_Display", "label": "", "tooltip": "", "place": "Select camera source>>", "group": "8712765e.3efe98", "order": 3, "width": 0, "height": 0, "passthru": true, "multiple": false, "options": [], "payload": "", "topic": "main_display", "topicType": "str", "x": 820, "y": 580, "wires": [[ "9786b516.47a1b8"] ] }, { "id": "9786b516.47a1b8", "type": "debug", "z": "170f950f.540b8b", "name": "", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 970, "y": 580, "wires": [] }, { "id": "8712765e.3efe98", "type": "ui_group", "name": "Main_Display_Area", "tab": "f8095777.501678", "order": 3, "disp": false, "width": "12", "collapse": false }, { "id": "f8095777.501678", "type": "ui_tab", "name": "Home Surveillance System", "icon": "dashboard", "disabled": false, "hidden": false } ]```
````

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [13 July 2021 15:39 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/7 "2021-07-13T15:39:38Z")

</div>

the payload you have to inject has to match the value of the dropdown - not the label.

```auto
[{"id":"c0cbd894.a69f48","type":"inject","z":"c929e2e7887a5d65","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"},{"p":"options","v":"[{\"Camera-1\":\"cam1\"},{\"Camera-2\":\"cam2\"},{\"Camera-3\":\"cam3\"},{\"Camera-4\":\"cam4\"},{\"Show media 2\":\"med2\"},{\"Show media 5\":\"med5\"}]","vt":"json"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"cam2","payloadType":"str","x":130,"y":500,"wires":[["e05207bf.b24e1"]]},{"id":"e05207bf.b24e1","type":"ui_dropdown","z":"c929e2e7887a5d65","name":"Main_Display","label":"","tooltip":"","place":"Select camera source>>","group":"8712765e.3efe98","order":3,"width":0,"height":0,"passthru":true,"multiple":false,"options":[],"payload":"","topic":"main_display","topicType":"str","x":320,"y":500,"wires":[["9786b516.47a1b8"]]},{"id":"9786b516.47a1b8","type":"debug","z":"c929e2e7887a5d65","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":470,"y":500,"wires":[]},{"id":"8712765e.3efe98","type":"ui_group","name":"Main_Display_Area","tab":"f8095777.501678","order":3,"disp":false,"width":"12","collapse":false},{"id":"f8095777.501678","type":"ui_tab","name":"Home Surveillance System","icon":"dashboard","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: [13 July 2021 16:32 UTC](https://discourse.nodered.org/t/ui-dropdown-no-reaction-to-input-payload-if-passing-through/38329/8 "2021-07-13T16:32:12Z")

</div>

Ahhh, thanks Dave! What confused me is the configuration options show:  
 ![Screen Shot 2021-07-13 at 12.20.01 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/3/a3001c4529d17c994392c3ae3cc36f39a04e2c85.png)  
.  
And the Help text starts off saying .

> Multiple **value / label** pairs can be added as required. If the label is not specified the value will be used for both.

Then but if you specity them in msg.options you have to reverse the order and use Label/Value.

> The Options may be configured by inputting `msg.options` containing an array. If just text then the value will be the same as the label, otherwise you can specify both by using an object of `"label":"value"` pairs :

And the fact that I was sending msg.option as a string didn't help either 🥴

I'm guessing changing the order - for msg.options - could effect current users flows so I think adding a bolded line to the end of the Options paragraph  
**Note, this is the opposite of the order entered in the node configuration**  
would be helpful
