CopyDisplayMask method: Field class

Syntax

CopyDisplayMask(Field_Object)

Description

Use the CopyDisplayMask method to copy the masking information from the source field object to the target field. The field that calls the CopyDisplayMask() method is the target field, and the field that is passed as a parameter of the method is the source field.

Parameters

Parameter Description

Field_Object

Specifies the source field object as a String value.

This field is the source field that will be copied to the target field.

Returns

A Boolean value. True if the target field is assigned masking information; False otherwise.

Example

&sourcefield = GetField(Field.RECNAME);
&sourcefield.SetDisplayMask("****@@@@");
&sourcevalue = &sourcefield.FormattedValue;
&targetfield = GetField(Field.AE_BIND_VALUE);
&targetvalue = &targetfield.FormattedValue;
&mymsg = "Before CopyDisplayMask Field.RECNAME is " | &sourcevalue | " and Field.AE_BIND_VALUE is " | &targetvalue;
MessageBox(0, "Before CopyDisplayMask", 0, 0, &mymsg);
&bool = &targetfield.CopyDisplayMask(&sourcefield);
&targetvalue = &targetfield.FormattedValue;
&mymsg = "After CopyDisplayMask Field.AE_BIND_VALUE is " | &targetvalue;
MessageBox(0, "After CopyDisplayMask", 0, 0, &mymsg);