Template Placeholders In Templates

I have a template I’m trying to create and one of the items in the template is a label that I have binded to the TagName property within a UDT. You can see in the first screenshot, within the template window, I have XX-XXXX in the text field to be used as a placeholder. The template is working fine as shown in the second screenshot. However, in reference to the third screenshot, when I close and reopen Designer, my placeholder is wiped out. It’s still works but I would like to be able see the placeholder when making changes to the template.






Right, it will be wiped out because it is referencing a value in the UDT. If you make the value “XX-XXXX” by default it will work just fine. If the value is empty string then it will clear it out.

So how would I go about making “XX-XXXX” the default value and still be able to have it display the correct tagname in my project with “XX-XXXX” not being wiped out next time I go to edit the template in question? Is this possible or am I just going to have to know that it’s there when edit the template? Or am I going about this the wrong way?

When using a binding of this type, the behavior you’re experiencing is normal. I would encourage you to keep it the way it is, as it will be simple to work with and follow later.

If you still really want to have placeholder text, you’ll need to use the expression binding type. Your expression will read something like:

if(PATH_TO_UDT_NAME=NULL,"XX-XXXX",PATH_TO_UDT_VALUE)

This will look at the ‘name’ property of the UDT and resolve to the placeholder string when it’s NULL, and the actual value you want when it’s not.