# What should be the type of dropdown output?

**URL:** <https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673>\
**Category:** Dashboard\
**Created:** [15 March 2021 14:40 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673 "2021-03-15T14:40:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ihbar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ihbar/32/38866_2.png) [@ihbar](https://discourse.nodered.org/u/ihbar)\
**Post date:** [15 March 2021 14:40 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673/1 "2021-03-15T14:40:34Z")

</div>

Hello  
I see something strange on dropdown node output :

With this simple test flow :  
 ![dropdown_test_flow](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/2/825108307d43a735f4bd03a13683973d2611cac1.png)  
I used this values  
 ![dropdown_test](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/0/e02b655eed27fad970cbbf693fa52cec1cbbc7d7.png)  
(note that 1st value is a number, other are strings)

When I test each values, I receive in the debug :  
 ![dropdown_test_result](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/0/a046c9166628f146d6cfb25afa73c3198a5bc556.png)

I would expect to received "2" as a string and not as a numerical value.  
This behavior has changed between dashboard 2.27.0 and 2.28.1.

Is there some reason to receive 2 as number while I set string in the node ? Is it the expected behavior ?

Node red 1.2.9 and nodejs v12.19.1

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [16 March 2021 09:30 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673/2 "2021-03-16T09:30:42Z")

</div>

Welcome to the forum.

~~I see that in Dashboard 2.28.2 also.~~ I think there was a fix for something in that area recently so possibly the fix corrected one thing and broke another. Since the developers have not noticed this thread so far the best thing to do is to submit an issue [here](https://github.com/node-red/node-red-dashboard/issues) so it will not get forgotten.

When reporting it export your mini-flow by selecting the nodes and select Export from the menu (or Ctrl+E) and paste it into the report. That makes it easy to test.

**[Edit]** I realise now that I was running the dashboard version from github master, not 2.28.2 so I have deleted that sentence.

---

<div class="post-metadata">

**Author:** ![ihbar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ihbar/32/38866_2.png) [@ihbar](https://discourse.nodered.org/u/ihbar)\
**Post date:** [16 March 2021 12:39 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673/3 "2021-03-16T12:39:00Z")

</div>

Thanks for your feedback Colin.  
I have submitted issue here:

> <https://github.com/node-red/node-red-dashboard/issues/691>
>
> What are the steps to reproduce?
> Create a dropdown node including a choice with string value 2
> See details in https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673
> What happens?
> when it...

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 March 2021 10:24 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673/4 "2021-03-19T10:24:13Z")

</div>

The issue has been fixed in github master, so should be in the next release of node-red-dashboard, which should be 2.28.2. If you want to try it now you can install the latest development version by (important!) going into your .node-red folder and using  
`npm install node-red/node-red-dashboard`  
Note that the install rebuilds the dashboard code, which on something like a Pi 3 can take a _very_ long time. Maybe an hour or more. Node red will continue to run while it installs however. Once it has installed then re-start node-red and clear the cache in your browser and refresh the page.  
When the new version is released then to install it remove the development version and install the released version (which does not take a long time as it is pre-built)  
`npm remove node-red-dashboard`  
`npm install node-red-dashboard`  
and again restart node-red and clear the browser cache.

---

<div class="post-metadata">

**Author:** ![ihbar](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ihbar/32/38866_2.png) [@ihbar](https://discourse.nodered.org/u/ihbar)\
**Post date:** [26 March 2021 09:11 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673/5 "2021-03-26T09:11:49Z")

</div>

Hello Colin  
I have tested with the version 2.28.2, it is working properly (both in the test flow and in my original flow).  
Thanks a lot for your very fast action.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 March 2021 09:35 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673/6 "2021-03-26T09:35:15Z")

</div>

For the record, it wasn't me that fixed it.

---

<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:** [9 April 2021 09:35 UTC](https://discourse.nodered.org/t/what-should-be-the-type-of-dropdown-output/42673/7 "2021-04-09T09:35:54Z")

</div>

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