FormatRecord Method

[This is preliminary documentation and subject to change.]

This is the FormatRecord method of the MsiEngine object. This method returns a formatted string from a template and record data.

Syntax

object.FormatRecord(record)

Parts

object
MsiEngine object.
record
Required MsiRecord object containing a template and data to be formatted. The template string must be set in field 0 followed by any referenced data parameters.

Remarks

The FormatRecord method uses the following format process.

Parameters to be formatted are enclosed in square brackets [..]. The square brackets can be iterated because the substitutions are resolved from inside out.

If a part of the string is enclosed in curly braces { } and contains no square brackets, the part is left unchanged, including the curly braces.

If a part of the string is enclosed in curly braces and contains one or more property names, and if all the properties are found, the text (with the resolved substitutions) is displayed without the curly braces. If any of the properties are not found, all the text in the curly braces and the braces themselves are removed.

    To format strings using the FormatRecord method

  1. The numeric parameters are substituted by replacing the marker with the value of the corresponding record field, with missing or Null values producing no text.
  2. The string that results is processed by replacing the non-record parameters with the corresponding values, as noted in the following descriptions.