Table of Contents

System variable expression examples

Interpolation of a globally resolved system variable

Input

'Now is {$datetimeutc} (UTC)'

Output

'Current database name is 01.01.2021 15:00:00 (UTC)'

Breakdown

  1. 'Now is '
  2. {$datetimeutc}
    • Evaluates to "01.01.2021 15:00:00'
  3. '(UTC)

Externally resolved system variable

Input

'Current database name is {$dbname}'

Output

"Current database name is E1_PROD"

Breakdown

  1. 'Current database name is'
  2. {$dbname}
  3. Evaluates to 'E1_PROD' via an external resolver.

Acquiring a data member from a system variable and applying a format specifier

Input

'Current company location is {$enterprisecompanylocation.LocationName:en}.'

Output

'Current company location is London, UK.'

Breakdown

  1. 'Current company location is '
  2. {$enterprisecompanylocation.LocationName:en}
    • Resolves system variable $enterprisecompanylocation to 'CompanyLocation' object type.
    • Follows the reference path:
      • .LocationName
    • Evaluates to MultilanguageString object
    • Format specifier finds :en and applies it.
    • Returns "London, UK'
  3. "."

#Error# Not existing system variable

Input

'Yesterday was {$yesterday}.'

Output

'Yesterday was #Error: System Variable '$yesterday' not found#.'

Breakdown

  1. 'Yesterday was'
  2. {$yesterday}
    • Resolves system variable $yesterday --> Fail. Such a system variable doesn't exist.
    • Returns error.
  3. '.'

#Error# Not existing reference

Input

'My name is {$user.RealName}.'

Output

'My name is #Error: Attribute 'RealName' not found#.'

Breakdown

  1. `'My name is''
  2. {$user.RealName}
    • Resolves system variable $user to a 'User' object type.
    • Follows the reference path:
      • .RealName --> Fail. Reference doesn't exist.
    • Returns error.
  3. '.'