picture

The picture property specifies a character pattern for data entry in a text field, and prevents entry of values that conflict with the specified pattern.

format-string can be any combination of characters, where the characters "A", "#" and "X" have a special meaning.

  • The character "A" specifies any letter (alpha-numeric) character at a given position.
  • The character "#" specifies any digit character at a given position.
  • The character "X" specifies any character at a given position.

Any character different from "A", "X" and "#" is treated as a literal. Such characters automatically appear in the field and do not have to be entered by the user.

The picture property does not require data entry into the entire field. It only requires that whatever characters are entered conform to format-string.

When picture specifies input formats for DATETIME and INTERVAL fields, the form compiler does not check the syntax of format-string, but your form will work if the syntax is correct. Any error in format-string, however, such as an incorrect field separator, produces a runtime error.

The typical usage for the picture property is for (fixed-length) CHAR fields. It is not recommended to use picture for other data types, especially numeric or date/time fields: The current value of the field must always match (i.e. be formatted according to) picture.

The picture property defines a mask for data entry. In order to format fields when data is displayed to the field, use the format property instead. The format property is typically used for numeric and date fields, while picture is typically used for formatted character string fields requiring input control.

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