Use this tag to the value that is returned by evaluating
the expression.
Synopsis
- Expression::<expression>
Options and arguments
- <expression>
- The expression can be any valid Perl expression. The expression
can include any Perl built-in function or any function that is defined
in the global scripts section of the schema to which the package is
applied. The Perl expression is validated against the EmailPlusTemplate
record type, not the target record type of the template. Expressions
can include embedded field expressions. See Working with embedded field expressions in meta tags.
Example
In this example, the expression formats
the current value of the
SubmitDate field using Perl. Suppose
the value of the
SubmitDate field is 23 February 2012 at 5:40
a.m. The text that is inserted into an email message is 23-02-2012
05:40:00.
#@Expression:: use Date::Format;use Date::Parse; my $template = "%d-%m-%Y %H:%M:%S"; time2str( $template, str2time( #?SubmitDate?#, "UTC" ) );@#
For
more examples of how to use the Expression tag, see Expression tag examples.