# Dynamically Changing the UDT used for a Pop Up

**URL:** <https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [October 10, 2023, 5:06am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245 "2023-10-10T05:06:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven\_Jackson](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Steven\_Jackson](https://forum.inductiveautomation.com/u/Steven_Jackson)\
**Post date:** [October 10, 2023, 5:06am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/1 "2023-10-10T05:06:08Z")

</div>

Hi,  
I have an application with many valves. I have made a pop up for a valve which accesses a UDT, so far so good. How can I define the UDT used on opening of the pop up for a particular valve.  
So on my main page I have many valves and then want to open the valve pop up by clicking on each valve but obviously want the information for THAT valve when it opens. UDT is defined in my View/Params for the pop up, I would like to change it dynamically.

Cheers !

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [October 10, 2023, 6:43am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/2 "2023-10-10T06:43:27Z")

</div>

I'm not sure I get it from you saying that the UDT is already defined in your params.

Sounds like you just need for all of your bindings to be Indirect tag bindings, use the params on there and link to your UDT instance and tag.

e.g.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/3/d3adef4f37e865db2084299a121b93b98192b24e.png)

---

<div class="post-metadata">

**Author:** ![Steven\_Jackson](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Steven\_Jackson](https://forum.inductiveautomation.com/u/Steven_Jackson)\
**Post date:** [October 10, 2023, 7:23am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/3 "2023-10-10T07:23:10Z")

</div>

Sorry, not explained very well ! I have one pop up that I want to open multiple times, but point at a different UDT (relevant to that valve) whenever I open it.

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [October 10, 2023, 7:28am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/4 "2023-10-10T07:28:02Z")

</div>

If you're using a button, or `OnClick` Event on something you can use the popup event, and write the UDT into the parameters.

This will then make that new UDT path appear in the popups parameters

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/72a4ed0a9dc7b9369a4931f8fa9460c77d778954.png)

---

<div class="post-metadata">

**Author:** ![Steven\_Jackson](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Steven\_Jackson](https://forum.inductiveautomation.com/u/Steven_Jackson)\
**Post date:** [October 10, 2023, 7:50am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/5 "2023-10-10T07:50:45Z")

</div>

OK, I went down that road. If I have 10 UDTs , say Valve 1 to Valve 10. What would I have to do here to make it read the correct UDT ?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/5/95125712bb9960384c12192347706e362de93d8d.png)

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [October 10, 2023, 7:57am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/6 "2023-10-10T07:57:51Z")

</div>

Say for example you have 10 valve objects on your HMI, I would normally create a custom prop on each, set the path to your UDT insatnce in there. Under your `Value` in parameters set the custom prop you made.

Or if you wanted you could write the path straight in there as well.

---

<div class="post-metadata">

**Author:** ![Steven\_Jackson](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Steven\_Jackson](https://forum.inductiveautomation.com/u/Steven_Jackson)\
**Post date:** [October 10, 2023, 8:29am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/7 "2023-10-10T08:29:24Z")

</div>

Hi,  
Went down the custom prop option, worked like a dream 🙂

---

<div class="post-metadata">

**Author:** ![Steven\_Jackson](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@Steven\_Jackson](https://forum.inductiveautomation.com/u/Steven_Jackson)\
**Post date:** [October 10, 2023, 9:53am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/8 "2023-10-10T09:53:08Z")

</div>

However !  
I just found, if you click on the object which opens the pop up and then defines the instance of the UDT, all is good, BUT the pop doesn't update with new values until you close it and re-open it.  
Did I miss something ??

---

<div class="post-metadata">

**Author:** ![Hayden\_Watson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/hayden_watson/32/48792_2.png) [@Hayden\_Watson](https://forum.inductiveautomation.com/u/Hayden_Watson)\
**Post date:** [October 10, 2023, 10:12am UTC](https://forum.inductiveautomation.com/t/dynamically-changing-the-udt-used-for-a-pop-up/80245/9 "2023-10-10T10:12:50Z")

</div>

Yeah, so this popup will keep its state when its open.

I would normally have this valve open its own popup, so you can control multiple at the same time.

Or I think if you set them to have the same Identifier I think they'll override each other.
