UDT script reporting specified tag does not exist

Hello! I have a question which I’m sure is very basic…

I am learning how to use UDTs and templates. So far so good with one exception. When I try to edit a UDT via script script editor (embedded in a button) the reply I’m getting is “the specified tag does not exist”. To be more specific here is a simplified version of what I’m trying to do:

tagpath = event.source.parent.IrrigationInterface.Memory.Hour
system.tag.write(tagpath,1)

Doing just the above triggers a tag does not exist error
I pulled in event.source.parent.IrrigationInterface.Memory.Hour straight from the property reference button for the UDT. Is the issue that this is being considered a property and not a tag? If so, how do I reformat or reference this as a tag?

Thank you all in advance for your advice here. I’m sure this is something simple… the issue is my going through learning curve!

The system.tag.write is to write into a tag directly. Your trying to write into a parameter of the template. That parameter may be bound to a tag but writing to it is different than to a tag.

Try going direct in with:

event.source.parent.IrrigationInterface.Memory.Hour = 1

This worked!!! Thank you for such a fast response!!!