# Custom Node Dynamic Behaviour

**URL:** <https://discourse.nodered.org/t/custom-node-dynamic-behaviour/89753>\
**Category:** Developing Nodes\
**Created:** [25 July 2024 10:45 UTC](https://discourse.nodered.org/t/custom-node-dynamic-behaviour/89753 "2024-07-25T10:45:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mr-jaffery](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@mr-jaffery](https://discourse.nodered.org/u/mr-jaffery)\
**Post date:** [25 July 2024 10:45 UTC](https://discourse.nodered.org/t/custom-node-dynamic-behaviour/89753/1 "2024-07-25T10:45:39Z")

</div>

Hi all,

I am creating a custom nod-red node. In which there is a select tag. I want its options to populate and change on runtime based on the input this node receives from any other node. How can i do this?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [25 July 2024 11:29 UTC](https://discourse.nodered.org/t/custom-node-dynamic-behaviour/89753/2 "2024-07-25T11:29:24Z")

</div>

The standard way to do this is to add an ExpressJS API endpoint in the runtime that the Editor can query and returns the data to update the select via jQuery.

Check out the code for the core serial node for an example.

---

<div class="post-metadata">

**Author:** ![mr-jaffery](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@mr-jaffery](https://discourse.nodered.org/u/mr-jaffery)\
**Post date:** [25 July 2024 13:00 UTC](https://discourse.nodered.org/t/custom-node-dynamic-behaviour/89753/3 "2024-07-25T13:00:44Z")

</div>

Yes, thank you. That worked.

---

<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:** [23 September 2024 13:01 UTC](https://discourse.nodered.org/t/custom-node-dynamic-behaviour/89753/4 "2024-09-23T13:01:20Z")

</div>

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