Action performed with indirect tag syntax

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.

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

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.

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.

Thank you, this is exactly what I needed.

Excellent. I’m glad it worked!