# Push Button On Template with Indirect Addressing Not Turning on in the PLC

**URL:** <https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354>\
**Category:** Ignition\
**Tags:** ignition79, vision\
**Created:** [October 16, 2024, 10:37pm UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354 "2024-10-16T22:37:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![rwoolnough](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@rwoolnough](https://forum.inductiveautomation.com/u/rwoolnough)\
**Post date:** [October 16, 2024, 10:37pm UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/1 "2024-10-16T22:37:39Z")

</div>

Hi Experts,  
I am hoping someone can help me. I have soured the forum, but I am unable to anything to help with my problem.  
The site is using Ignition V7.9 connected to a AB CompactLogix 1769-L33ER at V32.  
I have created a "popup" page with multiple parameters using indirect Tag Addressing which works perfectly. Depending on the button to call the popup, determines which parameter group is displayed.  
I am now trying to add an "Auto" & "Off" Push Buttons onto the popup.  
I have tried using a "1 Shot Button" and applied the indirect addressing, the same as the other parameters with no success. Is this a known issue with Ignition V7.9?  
How do I apply the "Page Root Container PoolNumber" Variable as a substitute for POOL\_1A?

event.source.parent.PoolNumber

value = 1  
system.tag.write('Stage2\_ValvePit/Pool\_1A/TempSP/Auto/AutoPB', value)

Thank You  
Woolie

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [October 16, 2024, 11:58pm UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/2 "2024-10-16T23:58:53Z")

</div>

> [@rwoolnough](#):
>
> applied the indirect addressing

Did you make the binding Bidirectional? If not then you aren't writing the new value anywhere.

> [@rwoolnough](#):
>
> How do I apply the "Page Root Container PoolNumber" Variable as a substitute for POOL\_1A?

```python
tagName = 'Stage2_ValvePit/%s/TempSP/Auto/AutoPB' % event.source.parent.PoolNumber
value = 1
system.tag.write(tagName, value)

```

---

<div class="post-metadata">

**Author:** ![rwoolnough](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@rwoolnough](https://forum.inductiveautomation.com/u/rwoolnough)\
**Post date:** [October 17, 2024, 12:12am UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/3 "2024-10-17T00:12:12Z")

</div>

Thanks Ryan,  
That piece of code is exactly what I was trying to write.  
I can cope sort of with Cicode (Citect) and some other languages, but Python / Json seems to get me confused.

Again Thanks for your prompt reply and the solution.  
Woolie

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [October 17, 2024, 12:21am UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/4 "2024-10-17T00:21:19Z")

</div>

> [@rwoolnough](#):
>
> Python / Json

My example is technically worse, its Python with Java's string formatting syntax. Python uses `{}` in conjunction with `.format()`, Java uses `%`. Jython lets you do that. 🤷

> **[Format Specifiers in Java - GeeksforGeeks](https://www.geeksforgeeks.org/format-specifiers-in-java/)**
>
> A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

[https://docs.python.org/2.7/library/string.html#format-string-syntax](https://docs.python.org/2.7/library/string.html#format-string-syntax)

If you watch any of the basic python tutorials out there that will get you 80-90% of the way. Syntax is the main thing to nail down, after that it's learning to handle Ignition's specific data types and methods.

Edit: Fixed link to point to python 2.7

---

<div class="post-metadata">

**Author:** ![rwoolnough](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@rwoolnough](https://forum.inductiveautomation.com/u/rwoolnough)\
**Post date:** [October 17, 2024, 2:30am UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/5 "2024-10-17T02:30:36Z")

</div>

Thanks for the links. Looks like there is more learning to be done over the weekend. Good thing I don't have a life!

Thanks again  
Woolie

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [October 17, 2024, 11:20am UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/6 "2024-10-17T11:20:44Z")

</div>

> [@ryan.white](#):
>
> Python uses `{}` in conjunction with `.format()`

Careful, 7.9 is still Python 2.5 which I don’t believe supports the `.format()` on strings. Pretty sure you still need to use the old style format parameters as you have shown in the script.

---

<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:** [October 17, 2024, 12:43pm UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/7 "2024-10-17T12:43:04Z")

</div>

You really should **not** point at Python3 documentation for Ignition purposes. This is better:

[https://docs.python.org/2.7/](https://docs.python.org/2.7/)

Ignore the warning banner, it isn't applicable to Jython.

---

<div class="post-metadata">

**Author:** ![rwoolnough](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@rwoolnough](https://forum.inductiveautomation.com/u/rwoolnough)\
**Post date:** [October 18, 2024, 5:53am UTC](https://forum.inductiveautomation.com/t/push-button-on-template-with-indirect-addressing-not-turning-on-in-the-plc/97354/8 "2024-10-18T05:53:55Z")

</div>

Thanks to you both, Irose & pturmel, for you input and advice.  
I'll will be looking at the link over the weekend.  
Woolie
