# Dynamic button inside popup question

**URL:** <https://forum.inductiveautomation.com/t/dynamic-button-inside-popup-question/51003>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [September 15, 2021, 2:32pm UTC](https://forum.inductiveautomation.com/t/dynamic-button-inside-popup-question/51003 "2021-09-15T14:32:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taylor.Johnson](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@Taylor.Johnson](https://forum.inductiveautomation.com/u/Taylor.Johnson)\
**Post date:** [September 15, 2021, 2:32pm UTC](https://forum.inductiveautomation.com/t/dynamic-button-inside-popup-question/51003/1 "2021-09-15T14:32:07Z")

</div>

Good morning all!

Im new to ignition and stuck on an issue. What I have is a popup window that has a full UDT passed through it. All of my basic bindings etc work. (This is a valve). So I can see the valve name, description, status, etc get pulled through. However, I put a pushbutton in that will set a tag in the PLC to 1. I tested it with a static tag and had no issues. But I am unable to bind that script to the dynamic tag.

I attached two pictures for reference. I see that when binding the label I am just choosing a property. With the button scripting, there doesnt seem to be a way to tie to the dynamic aspect of the popup?

 ![Button_Png_1](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/1/c18aee9460ab8d7149a20a4c834319fb736b5952.png)  
 ![Button_Png_2](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/3/13d40d461f3ac5e6f92b21474bf44dd75b835c55.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [September 15, 2021, 2:38pm UTC](https://forum.inductiveautomation.com/t/dynamic-button-inside-popup-question/51003/2 "2021-09-15T14:38:54Z")

</div>

Passing the tag as a parameter makes a snapshot, not a live instance. Instead, pass a tagpath string into the popup and use an indirect bidirectional **binding** inside the popup to have a live and editable instance.

---

<div class="post-metadata">

**Author:** ![zacht](https://avatars.discourse-cdn.com/v4/letter/z/ea5d25/32.png) [@zacht](https://forum.inductiveautomation.com/u/zacht)\
**Post date:** [September 15, 2021, 2:51pm UTC](https://forum.inductiveautomation.com/t/dynamic-button-inside-popup-question/51003/3 "2021-09-15T14:51:27Z")

</div>

> [@Introducing Flintium! An open source library of Ignition faceplates](https://forum.inductiveautomation.com/t/introducing-flintium-an-open-source-library-of-ignition-faceplates/36302):
>
> I’ve been working on this library for a while now, and just made the repository public. Originally based on the [FactoryPacks](https://inductiveautomation.com/exchange/113/overview) project from the Ignition Exchange. Once Flintium is stable, a version will be posted to the Exchange, but for now, feel free to try out the working version on Github. The project needs input from this community! For information on contributing, please see the [Contributing](https://github.com/jlbcontrols/Flintium/wiki/Contributing) Wiki page. Anyone is welcome to post comments, feature requests, and report bugs on the [issues pa…](https://github.com/jlbcontrols/Flintium/issues)

I'm not involved in any way, but it looks like you're trying to do something similar to this.

---

<div class="post-metadata">

**Author:** ![Taylor.Johnson](https://avatars.discourse-cdn.com/v4/letter/t/c68b51/32.png) [@Taylor.Johnson](https://forum.inductiveautomation.com/u/Taylor.Johnson)\
**Post date:** [September 15, 2021, 5:34pm UTC](https://forum.inductiveautomation.com/t/dynamic-button-inside-popup-question/51003/4 "2021-09-15T17:34:35Z")

</div>

@pturmel - Thank you for the info that got me on the right path.  
@zacht - Good eye! That is similar to what Im working on… Instead of trying to recreate every option of the PAX object, trying to just pull in the values that are needed for control and display since we use the excel online edits sheet for setting up every block - no need to make all the extra pages etc.

What I ended up doing instead was making a memory tag in my UDT thats value was linked to the custom property I use everywhere.

Then I went into the button and used script editor instead of set tag value. (Thank you Peter Lo)

Final code was:

value = 1  
system.tag.writeBlocking([str(event.source.parent.valvenumber.DynamicTagTie) + “/OCmd\_Close”], [value])
