The template (as well as all other info about any LE) is available to be get or set using the Attribute and @Attribute functions. So, yes - usually one would:
var template as string
var str as string
template = @Attribute(MyLE, ATTR_ID_ENTRY_TEMPLATE)
if(not @Error)
{
str = @DeTemplateString(template, MyLE)
}
If, for example, you wanted to eliminate the dash, but not the parenthesis, you would use: "*###* ###-####" as the template, instead of: "(###) ###-####". Any position containing a "*" will accept whatever character is at that position in the source string. That way you do not inadvertantly eliminate characters that were allowed by the original template and entered (correctly) by the user.
Templates are a design time spec, like custom help, tooltips, formatting, etc... Not a runtime spec, like import, export, mass update, etc... So, no - the end user cannot edit, load, or save templates. Only the designer can do that.
But, the programmer, using the Attribute function, can dynamically alter/edit/disable/enable templates as well as all of the other LE attributes.