# Issues with loading async list for drop down in edit dialogue

**URL:** <https://discourse.nodered.org/t/issues-with-loading-async-list-for-drop-down-in-edit-dialogue/33409>\
**Category:** Developing Nodes\
**Created:** [27 September 2020 13:44 UTC](https://discourse.nodered.org/t/issues-with-loading-async-list-for-drop-down-in-edit-dialogue/33409 "2020-09-27T13:44:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)\
**Post date:** [27 September 2020 19:58 UTC](https://discourse.nodered.org/t/issues-with-loading-async-list-for-drop-down-in-edit-dialogue/33409/2 "2020-09-27T19:58:00Z")

</div>

> [@Roaders](#):
>
> Issue number 1:  
> When I am initially setting up the first node and creating the config node I am unable to load the list of devices. The reason for this is when I make the async call from the edit dialogue to the node process the config node has not yet been saved

Hi @Roaders,  
I think this [discussion](https://discourse.nodered.org/t/initializing-config-screen-based-on-new-config-node/7327) is about a rather similar issue. In my [media node](https://github.com/bartbutenaers/node-red-contrib-onvif-nodes/blob/master/onvif_media.html#L55) I get the config node (on the client side), but I send the config node properties to the server side endpoint (since I don't know whether it has been deployed yet):

```auto
configNode = RED.nodes.node(configNodeId);
             
// All client-side config data should be send to the server (since we don't know if it is dirty or not).
var configData = {};
configData.hostname = configNode.xaddress;
...
$.getJSON("onvifdevice/profiles/" + configNodeId, configData, function(profiles) {
   ...
}

```

Then in the endpoint on the server-side, I try to find the config node (and if I don't find it, I use the config node properties that the client side has passed):

```auto
var configNode = RED.nodes.getNode(req.params.config_node_id)

// Get the profiles of the camera, based on the config data on the client, instead of the config data
// stored inside this config node. Reason is that the config data on the client might be 'dirty', i.e. changed
// by the user but not deployed yet on this config node. But the client still needs to be able to get the profiles
// corresponding to that dirty config node. That way the config screen can be filled with profiles already...
// But when the config data is not dirty, we will just use the profiles already loaded in this config node (which is faster).
// See https://discourse.nodered.org/t/initializing-config-screen-based-on-new-config-node/7327/10?u=bartbutenaers
configNode.getProfiles(req.query, res);
...

```

Note that my Onvif nodes are still in beta phase, so the logic might not be entirely correct yet!  
Perhaps this is not exactly a solution for your problem, but it might give you an idea of how you can solve this ...

> [@Roaders](#):
>
> how do I force a re-validation of the select value after creating the options?

I don't know that... Hopefully somebody else can join the discussion.

Bart

---

_[View the full topic](https://discourse.nodered.org/t/issues-with-loading-async-list-for-drop-down-in-edit-dialogue/33409)._
