Skip to main content

Literal Properties

Literal Properties

This section describes how the Populate() method, by default, generates data for properties of the forms:

Property PropertyName as Type;
Property PropertyName;

Where Type is a datatype class.

For these properties, the Populate() method first looks at the name. Some property names are handled specially, as follows:

If the property name is any case variation of the following Populate() invokes the following method to generate data for it
NAME Name()
SSN SSN()
COMPANY Company()
TITLE Title()
PHONE USPhone()
CITY City()
STREET Street()
ZIP USZip()
MISSION Mission()
STATE USState()
COLOR Color()
PRODUCT Product()

If the property does not have one of the preceding names, then the Populate() method looks at the property type and generates suitable values. For example, if the property type is %StringOpens in a new tab, the Populate() method generates random strings (respecting the MAXLEN parameter of the property). For another example, if the property type is %IntegerOpens in a new tab, the Populate() method generates random integers (respecting the MINVAL and MAXVAL parameters of the property).

If the property does not have a type, InterSystems IRIS assumes that it is a string. This means that the Populate() method generates random strings for its values.

Exceptions

The Populate() method does not generate data for a property if the property is private, is multidimensional, is calculated, or has an initial expression.

FeedbackOpens in a new tab