# Action performed with indirect tag syntax

**URL:** <https://forum.inductiveautomation.com/t/action-performed-with-indirect-tag-syntax/44669>\
**Category:** Ignition\
**Created:** [March 19, 2021, 1:11am UTC](https://forum.inductiveautomation.com/t/action-performed-with-indirect-tag-syntax/44669 "2021-03-19T01:11:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![blueberry](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@blueberry](https://forum.inductiveautomation.com/u/blueberry)\
**Post date:** [March 19, 2021, 1:11am UTC](https://forum.inductiveautomation.com/t/action-performed-with-indirect-tag-syntax/44669/1 "2021-03-19T01:11:08Z")

</div>

Hello,  
I am not familiar with scripting. Could you one please help me correct my syntax for action after a button is pushed?  
I did made a Root Container.CELL\_NUMBER. I would like to use this control the cell selection.  
The system generate this code when I specifically specify the cell.  
value = 1  
system.tag.writeBlocking([’[default]CELL 1/BUTTON/SELECT\_MANUAL’], [value])

When I clicked on insert property reference I got this line but no ideas how to put them together.  
event.source.parent.CELL\_NUMBER

Also if someone can recommend a good manual to read on this that would be great.  
Thank you,  
Blue

---

<div class="post-metadata">

**Author:** ![BryanB](https://avatars.discourse-cdn.com/v4/letter/b/57b2e6/32.png) [@BryanB](https://forum.inductiveautomation.com/u/BryanB)\
**Post date:** [March 19, 2021, 6:43am UTC](https://forum.inductiveautomation.com/t/action-performed-with-indirect-tag-syntax/44669/2 "2021-03-19T06:43:44Z")

</div>

Are you trying to write to Cell ###, where ### is set by Root Container.CELL\_NUMBER?

If so, try something like this. This will write the value of “1” to the indirect tag path.

```auto
cellNumber = event.source.parent.CELL_NUMBER # create a Python variable with the cell number
tagPath = '[default]CELL ' + str(cellNumber) + '/BUTTON/SELECT_MANUAL’
print tagPath # optional - this will print 'tagPath' to the Output Console so you can verify it looks correct
value = 1
system.tag.writeBlocking([tagPath], [value])

```

Because the tag path in system.tag.writeBlocking() is just a string (inside a list) you can concatenate together a tag path. Note that the above “tagPath = …” may have issues if the cell number changes in format (like Cell 00, Cell 1, Cell 10, etc.). This may or may not affect you - just something to think about.

---

<div class="post-metadata">

**Author:** ![blueberry](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@blueberry](https://forum.inductiveautomation.com/u/blueberry)\
**Post date:** [March 19, 2021, 7:49pm UTC](https://forum.inductiveautomation.com/t/action-performed-with-indirect-tag-syntax/44669/3 "2021-03-19T19:49:44Z")

</div>

Thank you, this is exactly what I needed.

---

<div class="post-metadata">

**Author:** ![BryanB](https://avatars.discourse-cdn.com/v4/letter/b/57b2e6/32.png) [@BryanB](https://forum.inductiveautomation.com/u/BryanB)\
**Post date:** [March 23, 2021, 4:08am UTC](https://forum.inductiveautomation.com/t/action-performed-with-indirect-tag-syntax/44669/4 "2021-03-23T04:08:04Z")

</div>

Excellent. I’m glad it worked!
