# Sharing dropdown list between Program Node & Installation Node

**URL:** <https://forum.universal-robots.com/t/sharing-dropdown-list-between-program-node-installation-node/1622>\
**Category:** URCap Development\
**Created:** [February 13, 2018, 12:01pm UTC](https://forum.universal-robots.com/t/sharing-dropdown-list-between-program-node-installation-node/1622 "2018-02-13T12:01:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon87740039](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@anon87740039](https://forum.universal-robots.com/u/anon87740039)\
**Post date:** [February 13, 2018, 12:01pm UTC](https://forum.universal-robots.com/t/sharing-dropdown-list-between-program-node-installation-node/1622/1 "2018-02-13T12:01:45Z")

</div>

Hello!

Has anyone figured out a clever way to share a dropdown list between the installation node and program node?

What I want to do is add items to a dropdown list and set coordinates to the various items in the dropdown list. Then I want the program node tab to get the data from the installation node tab and create waypoints based on it. I got most of this down, the part im struggling with is getting the program node dropdown to point to the installation drop down and get the data from there. Has anyone else implemented something similar to this and are willing to share how they went about doing it?

---

<div class="post-metadata">

**Author:** ![anon81989367](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@anon81989367](https://forum.universal-robots.com/u/anon81989367)\
**Post date:** [June 25, 2018, 12:03pm UTC](https://forum.universal-robots.com/t/sharing-dropdown-list-between-program-node-installation-node/1622/2 "2018-06-25T12:03:34Z")

</div>

What about saving data in the data model and then import the data from the data model on the programNode?

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [June 27, 2018, 8:29am UTC](https://forum.universal-robots.com/t/sharing-dropdown-list-between-program-node-installation-node/1622/3 "2018-06-27T08:29:24Z")

</div>

Store the general data in the Installation node.  
From the program node, you can use the API to get the Installation Node.  
Check out the method `getInstallationNode(Class<T> installationType)` which in HTML nodes are used as:

`HelloWorldInstallationNodeContribution contribution = api.getInstallationNode(HelloWorldInstallationNodeContribution.class)`

And where `api` is your instance of the URCapsAPI from the program node contribution constructor.

This gives you the instance loaded of the installation node contribution, and allows you to call any public method in this class.  
Then, in your Installation node, create a public method, to hand over the data the program node needs;

```auto
public List<String> getStringListForProgramNode() {
   return someList;
}

```

And in your program node by:

```auto
List<<String> myStringList = api.getInstallationNode(HelloWorldInstallationNodeContribution.class).getStringListForProgramNode()`;

```

This is also used in the Hello World program node, to get the Title stored in the Installation.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/system/32/1_2.png) [@system](https://forum.universal-robots.com/u/system)\
**Post date:** [January 26, 2021, 10:26pm UTC](https://forum.universal-robots.com/t/sharing-dropdown-list-between-program-node-installation-node/1622/4 "2021-01-26T22:26:16Z")

</div>

Closed on January 26, 2021, 10:26pm UTC

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