Up to 6 templates can be defined in template administration.
Templatefield 1-6 in lists can be set with template or with script. This is only running in user-Event.
windowevent predesign
dw_1.template.x.property=value
end event
template.x.sql 
  | 
SQL-Sequence - always defined as a string, varchar(50). 
 Read the template information with: <template.sql.1>, ....<template.sql.6>  | 
|
template.x.text  | 
Title  | 
|
template.x.format  | 
 
  | 
|
template.x.alignment  | 
1=left  | 
|
replacetemplatefields  | 
Replace all space(50) as templatefieldX in the current datawindow with sql statements from current template definition 
 dw_2.replacetemplatefields() dw_2.retrieve  |