Templating is widely used in PYXI. Blocks of text displayed in Forms and the content of Pages are the best starting points to consider.
A template is usually evaluated in the context of a specific record. The importance of this becomes apparent as soon as you consider the primary automations of how a template is processed:
As a Developer user, you will find a Playpen option at the bottom-left of every record page.
This Playpen provides you with a facility to test Template Scripts – these are evaluated against the record ‘on the fly’ and the result shown to you.
The template output itself is presented, and additionally a table is shown with the value of any variables that were sent during the script evaluation. This is also a handy way to test logic built up in other places where scripts are used, such as in View records for Column Views or Funnel Views.
Note that field names, and calculations in general, are case-insensitive.
Evaluated on a Person record, this will display only if that person is a user. The entire template is a single calculation using the if function.