# Dashboard Ui-Dropdown

**URL:** <https://discourse.nodered.org/t/dashboard-ui-dropdown/90680>\
**Category:** Dashboard\
**Tags:** node-red-dashboard\
**Created:** [3 September 2024 14:57 UTC](https://discourse.nodered.org/t/dashboard-ui-dropdown/90680 "2024-09-03T14:57:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cam215](https://avatars.discourse-cdn.com/v4/letter/c/71c47a/32.png) [@cam215](https://discourse.nodered.org/u/cam215)\
**Post date:** [3 September 2024 14:57 UTC](https://discourse.nodered.org/t/dashboard-ui-dropdown/90680/1 "2024-09-03T14:57:53Z")

</div>

I'm trying to create a dropdown with some index values that I get from a previous array.

I first write this function to get the indexes:

```js
let indexes = [];

// Iterate through each item in msg.payload
msg.payload.forEach((item, index) => {
    // Push the index into the indexes array
    indexes.push(index);
});

// Set the indexes for the dropdown
msg.payload = indexes;
return msg;

```

And then I connect it to the ui-dropdown node. However, the dropdown appears in blank on my dashboard.

Anyone that may know why ?????

Thanks

---

<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:** [3 September 2024 15:32 UTC](https://discourse.nodered.org/t/dashboard-ui-dropdown/90680/2 "2024-09-03T15:32:25Z")

</div>

Try  
`msg.options = indexes;`

---

<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:** [3 October 2024 15:32 UTC](https://discourse.nodered.org/t/dashboard-ui-dropdown/90680/3 "2024-10-03T15:32:42Z")

</div>

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