How To Use Data Masks

Three types of data masks are available: output masks, display masks and input masks.

Output Masks

An output mask is used to format the data value of a field in a list, report or output command.

The output mask of a field is defined by its FieldMask attribute.

An explicit output mask can be applied to a field, and also to a form field or to any data value, using either:

Displays Masks

A display mask is apparent only when a data value is being displayed in an entry field.

When data is being input to a display-masked entry field, the display mask will be substituted by the input mask (if defined).

Once data input is completed, the data value of the form field will be presented formatted by the display mask.


The display mask for an entry field is defined by its DataMask attribute.

Input Masks

When defined, an input mask is presented when data is being typed in an entry field (i.e., the entry field is available and has focus);

If the input mask is not defined, the display mask will act as the input mask.

In either case, the value of the input data must conform to the effective input mask , as well as to the validation rule (if defined) in effect for that entry field.


The input mask for an entry field is defined by its WdgInputMask attribute.

Masks and Data Types

For a more detailed explanation of mask patterns and their relation to data types, see Masking.


Related Topics