Skip to content

Built in variables

Ryan Newington edited this page Sep 4, 2025 · 5 revisions

Built-in Variables

ACMA contains several built-in variables that can be used in declarations.

Date and Time Variables

%date%

Returns a DateTime value representing the current date and time in the local time zone.

%utcdate%

Returns a DateTime value representing the current date and time in UTC.

Unique Identifier Variables

%newguid%

Returns a new globally unique identifier (GUID).

Random Value Variables

%randstring:x%

Returns a cryptographically random string of the length specified by the x parameter.

Examples:

  • %randstring:10% returns a 10 character random string
  • %randstring:50% returns a 50 character random string

%randnum:x%

Returns a cryptographically random number either 2, 4, or 8 digits in length. Use the x parameter to specify the length.

Examples:

  • %randnum:4% returns a 4 digit random number
  • %randnum:8% returns an 8 digit random number

Special Constructor Variables

%n% and %o%

%n% and %o% are special variables that only work within a unique value constructor. They are used by the constructor to ensure the value generated by the constructor is unique.

Clone this wiki locally