DictField.aliasFor Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the ID of the alias field, if the field is an alias for another field.
public:
virtual int aliasFor();
public virtual int aliasFor ();
abstract member aliasFor : unit -> int
override this.aliasFor : unit -> int
Public Overridable Function aliasFor () As Integer
Returns
The ID of the alias field for the field; 0 (zero) if the field is not an alias for another field.
Remarks
When the user enters data in a field, the validateField method of the table is called. If the validateField method cannot perform a lookup on the value, it checks whether an alias exists. If an alias field exists, the validateField method performs a lookup on the alias field.
The following example shows the retrieval of the alias field for a field.
DictField df;
fieldId fId;
df = new DictField(tablenum(CustTable), fieldnum(CustTable, AccountNum));
if (df)
{
fId = df.aliasFor();
if (0 != fId)
{
print (strfmt("Field alias: %1", fieldid2name(tablenum(CustTable), fId)));
}
}