The sample property defines the text to be used to compute the width of a formField.

By default, formFields are rendered by the client with a size determined by the current font and the number of characters used in the layout grid. The field width is computed so that the largest value can fit in the widget.

Sometimes the default computed width is too wide for the typical values displayed in the field. For example, numeric fields usually need less space as alphanumeric fields. If the values are always smaller, you can use the sample property to provide a hint for the front end to compute the best width for that formField.

When specifying the sample property, you do not have to fill the sample string up to the width of the corresponding field tag: The front-ends will be able to compute a physical width by applying a ratio to fit the best visual result. For example, for a sample of 'XY' used for a field defined with 10 characters, is equivalent to specifying a sample of 'XYXYXYXYXY'.

For additional information, see the SAMPLE attribute topic in the Genero Business Development Language User Guide.