Attention: As you work with EmailPlus expressions and
meta tags, note that
$entity is a special Perl
variable in IBM® Rational® ClearQuest®. This variable refers to the
current entity that is being processed. If you use
$entity in
an EmailPlusTemplate or an EmailPlusRule expression, the
$entity variable
in your expression will refer to the record type that you are currently
modifying. If you make a call to
$entity->GetFieldValue($fieldName)->GetValue() and
$fieldName is
the name of a field that does not exist in your current EmailPlusTemplate
or EmailPlusRule record, then the expression will not be evaluated
correctly. To remedy this problem, the EmailPlus functions
Gfv() and
Gfov() return
the value of fields from the record the EmailPlusRule relates to,
even if the fields do not exist on the current record. See
EmailPlus global script functions for more information
about the
Gfv()function and the
Gfov().
- Gfv($fieldName)
- This function is the equivalent of calling $entity->GetFieldValue($fieldName)->GetValue().
When the EmailPlusTemplate is evaluated, this function is evaluated
correctly.
- Gfov($fieldName)
- This function is the equivalent of calling $entity->GetFieldOriginalValue($fieldName)->GetValue().
When the EmailPlusTemplate is evaluated, this function is evaluated
correctly.
In some cases, it is possible to
use the
$entity variable in EmailPlusTemplates
for non-specific calls that are not dependent on RecordType. For example,
you can use the
$entity variable to call
$entity->GetFieldsUpdatedThisEntireAction(),
which would be evaluated correctly against the EmailPlusTemplate and
the record type that the template references.
It is possible to
use the resulting array of field names to retrieve field values because
it always returns a list of fields that exist on the current entity.