Skip to content

Format

Returns the result of template by specified xml node if found, otherwise returns empty string.

1
$Templates.Format(name: string, node: Xml):string

Parameters

string name
    Name of template

Xml node
    Xml node to use as input. Optional. If not specified, $Xml is used.

Remarks

Example

1
Content of template can be in XSLT or data templates format.

Basic Usage

1
var result = $Templates.Format('Purchase Order', $Xml.SelectSingle('Order'))

Sending Email

1
2
3
4
$Messages.New(targetEmailAddress,
    $Templates.Subject('Purchase Order'),
    $Templates.Format('Purchase Order', $Xml.SelectSingle('Order'))
).Send();

See Also