# Add global options dynamically to ui-dropdown

**URL:** https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923
**Category:** General
**Created:** [13 February 2019 11:39 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923 "2019-02-13T11:39:17Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![hathemi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hathemi/32/3792_2.png) [@hathemi](https://discourse.nodered.org/u/hathemi)
#### Post date: [13 February 2019 11:39 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/1 "2019-02-13T11:39:17Z")

</div>

![drop](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/e/e11413cb876a4ed7b4a0d575b18180758370217a.png)  
 ![dropdown](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/1e2a75838519c34db440a38432f506f67cfa438b.png)

i have a button in case i want to add other option to dropdown in my dashboard.  
is there a possible way to add global options dynamically to ui-dropdown ???  
thanks in advance.

---

<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 February 2019 13:01 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/2 "2019-02-13T13:01:42Z")

</div>

you can dynamically inject all the options as per the info bar.

These values are read at deploy time so adding globals here would not make it dynamic - we could possibly add environment variables - but again they would only be read at deploy time.

---

<div class="post-metadata">

### Author: ![hathemi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hathemi/32/3792_2.png) [@hathemi](https://discourse.nodered.org/u/hathemi)
#### Post date: [13 February 2019 13:07 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/3 "2019-02-13T13:07:26Z")

</div>

> [@dceejay](#):
>
> we could possibly add environment variables

how could it be possible ? is there an exemple ?

---

<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 February 2019 13:15 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/4 "2019-02-13T13:15:20Z")

</div>

could = conditional future = it is possible to change the code to do this.  
it has not been done yet - just a thought. (and there are no immediate plans to do so). - so nothing to see.

---

<div class="post-metadata">

### Author: ![hathemi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hathemi/32/3792_2.png) [@hathemi](https://discourse.nodered.org/u/hathemi)
#### Post date: [13 February 2019 13:17 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/5 "2019-02-13T13:17:31Z")

</div>

thnx anyway.

---

<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 February 2019 16:58 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/6 "2019-02-13T16:58:39Z")

</div>

For now the answer is to inject the options you want as per the info sidebar, which would be as dynamic as you want.

---

<div class="post-metadata">

### Author: ![danielo515](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danielo515/32/31899_2.png) [@danielo515](https://discourse.nodered.org/u/danielo515)
#### Post date: [30 January 2021 18:08 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/7 "2021-01-30T18:08:01Z")

</div>

Is this still impossible?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [30 January 2021 18:14 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/8 "2021-01-30T18:14:06Z")

</div>

It isn't impossible. You dynamically set the drop-down options by passing in a message containing the options you want, just as @dceejay says.

---

<div class="post-metadata">

### Author: ![danielo515](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/danielo515/32/31899_2.png) [@danielo515](https://discourse.nodered.org/u/danielo515)
#### Post date: [30 January 2021 19:23 UTC](https://discourse.nodered.org/t/add-global-options-dynamically-to-ui-dropdown/7923/9 "2021-01-30T19:23:16Z")

</div>

Sorry, I got confused about the question.  
Seems this is about the dropdown on the UI. I was talking about displaying a dynamic a list of elements on a subflow env variable using a dropdown
