Skip to content

Built in variables

ryannewington edited this page Jun 22, 2016 · 4 revisions

Built-in Variables

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

%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

%newguid%

Returns a new globally unique identifier (GUID)

%randstring:x%

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

  • %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

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

%n% and %o%

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

Clone this wiki locally