BuildUniqueKeyField

Description

Builds and returns a unique key query field.

Adds the unique key as a field (as a display column) in the query's search results. The display column is added to the list so its number, or column value (for GetColumnValue), is one higher than the last column added to the list (or 1 if it is the first column).

The IsShown property (of the returned QueryFieldDef object) must be set to True for the field to be added to the display list. If the value for the IsShown property is set to False, the unique key is not added to the query result set as a column.

A unique key is the same value as the display name for a record. For more information, see Record types

Note: The returned QueryFieldDef object shows the field path name to be the DBID field. The QueryFieldDef is translated into the display name in the result set. However, if you try to get the value contained in the returned QueryFieldDef (from the call to BuildUniqueKeyField), you get a DBID and not the unique key, for both stateful and stateless record types.

Syntax

VBScript

 querydef.BuildUniqueKeyField 

 

Perl

 $querydef->BuildUniqueKeyField(); 

 
Identifier
Description
querydef
A QueryDef object.
Return value
Returns a QueryFieldDef object for the unique key query field.


Feedback