System variable expression examples
Interpolation of a globally resolved system variable
'Now is {$datetimeutc} (UTC)'
Output
'Current database name is 01.01.2021 15:00:00 (UTC)'
Breakdown
'Now is '
{$datetimeutc}
- Evaluates to
"01.01.2021 15:00:00'
'(UTC)
Externally resolved system variable
'Current database name is {$dbname}'
Output
"Current database name is E1_PROD"
Breakdown
'Current database name is'
{$dbname}
- Evaluates to
'E1_PROD'
via an external resolver.
'Current company location is {$enterprisecompanylocation.LocationName:en}.'
Output
'Current company location is London, UK.'
Breakdown
'Current company location is '
{$enterprisecompanylocation.LocationName:en}
- Resolves system variable
$enterprisecompanylocation
to 'CompanyLocation' object type.
- Follows the reference path:
- Evaluates to
MultilanguageString
object
- Format specifier finds
:en
and applies it.
- Returns
"London, UK'
"."
#Error# Not existing system variable
'Yesterday was {$yesterday}.'
Output
'Yesterday was #Error: System Variable '$yesterday' not found#.'
Breakdown
'Yesterday was'
{$yesterday}
- Resolves system variable
$yesterday
--> Fail. Such a system variable doesn't exist.
- Returns error.
'.'
#Error# Not existing reference
'My name is {$user.RealName}.'
Output
'My name is #Error: Attribute 'RealName' not found#.'
Breakdown
- `'My name is''
{$user.RealName}
- Resolves system variable
$user
to a 'User' object type.
- Follows the reference path:
.RealName
--> Fail. Reference doesn't exist.
- Returns error.
'.'