Defines an individual field in a mapper. Mappers implement the IMapper interface and are the platform's implementation of an Object Relational Mapper (ORM). The mapper acts as a sophisticated RecordSet that performs database binding and exposes data from the database for programmatic manipulation and display.

The mapper contains a set of fields in its Fields collection. Each field typically corresponds to a column in the mapper's underlying view. However multiple fields can be mapped to a single column (using the AliasName property) and a field can be marked as ExcludeFromSelect to indicate that there is no corresponding column in the view.

The field object is used to read, insert, and update column values via the Value property. It is also used to manage presentation layer information and to expose all the field's meta-data settings.

Each field has a specified CellTypes that dictates its basic UI implementation. A set of FieldAttrs provide high-level control over field behaviour.

The Field's Exec(FieldExecCmds, Int32, array<Object>[]()[][]) method exposes additional functionality via FieldExecCmds.

Namespace: NetQuarry.Data
Assembly: EAP.Core (in EAP.Core.dll) Version: (


public interface IField
Visual Basic
Public Interface IField


Generally you will not instantiate IField-implementing objects directly, but will work with existing IField objects obtained from the field's IMapper.Fields collection. In the unusual case where you DO need to instantiate an IField object directly, the Field class is the standard implementation of a field. You may also implement your own IField object (though this is not really recommended) by deriving from FieldKernel which implements virtually all standard field functionality.


Generally a field's Key is used for all naming purposes for the field. However, a number of properties are provided for overriding naming in different contexts:
  • AliasName - The name of the field in the SELECT statement.
  • ColumnName - The name of the field's underlying column in the database, when writing.
  • ControlName - The name of the control to which this field should bind.
  • PropertyName - The name to use for the property element in the generated TypedMapper.
  • RemotePropertyName - The name to use for the property element in the generated RemoteMapper.
  • SelectExpr - A SQL expression to use in the mapper's SELECT clause.


In addition to class properties on IField objects, a large number of properties are maintained in the NetQuarry Studio and stored in each field's Properties collection. These properties also affect field behaviour and may be set/read programmatically from that collection. Some of the most important of these are:
  • AggregateType - The aggregate function to use when calculating mapper (datasheet) aggregate row values. If not specified, Sum is used for numeric fields and None for others.
  • CalculatedValue - Javascript expression that represents the value for this field. (May include field references.)
  • CssClass - The CssClass to use.
  • Discrim - The value or field reference to use as the Picklist discriminator.
  • FieldBehaviorAttributes - Miscellaneous FieldBehaviorOptions options affecting the behaviour of the field.
  • FieldExportAttrs - FieldExportAttrs attributes specifying how this field should be handled during export processing (e.g. to Excel).
  • FieldGroupingAttrs - FieldGroupingAttrs attributes specifying how mapper grouping should be performed on a specific field.
  • FieldImportAttrs - FieldImportAttrs attributes specifying how this field should be handled during import processing.
  • FieldSecurityAttributes - FieldSecurityAttrs field-level security options.
  • FilterOptions - FieldFilterOptions options specifying field filtering availability and behaviour.
  • GroupingSpec - Specifies how rows are to be grouped when grouping in the datasheet. See the Customize Datasheet Grouping wiki article for more information.
  • HideFlavor - The flavor(s) for which this field should be hidden.
  • LabelCssClass - The CSS class to use for the field's label.
  • LabelOptions - LabelOptions options controlling the presention of a field's label.
  • LinkBehaviorAttributes - LinkBehaviorAttributes options specifying field link behaviour.
  • ListOptions - FieldListOptions options affecting behaviour of field in list views.
  • LockFlavor - The flavor(s) for which this field should be locked (additive to other reasons for locking).
  • Max - Maximum allowed value for the field. (May include field references).
  • MaxLength - The maxiumn number of characters to accept into the field.
  • MaxLengthTruncate - If a is specified, the field's value should be truncated to that length automatically.
  • Min - Minimum allowed value for the field. (May include field references).
  • OnChange - Javascript placed on the control's onchange event. Note that the script will be resolved for field expressions and embedded functions if, and oly if, wrapped in a !fnResolve().
  • OnStartup - Javascript registered in the page's StartupScript. Supports field references including the [~.] notation to get a reference to the current field.
  • SelectExpr - A SQL expression to use in the mapper's SELECT clause. The results will be aliased to the normal field SELECT name using AS.
  • SourceField - Another field in the mapper from which to copy any non-null value on an insert. Typically used on a foreign key to identify the corresponding join value.
  • SummaryKey - The RowKey for the HoverSummary related item.
  • SummaryMOP - The Page to use for HoverSummary information.
  • Timezone - The timezone format. Leave blank to store as written, use 0,. to store GMT, display local.
  • ToolTipOptions - ToolTipOptions options specifying how the field's tooltip is to be presented.
  • ValidationRegEx - A regular expression used to validate the field value. The field will be considered valid if the expression matches.
  • ValidationScript - A custom javascript validation function for the field of the form func(fld, val, full, caption) returning an error message string if validation failed else a null or blank string.
See FieldProperties for a list of such properties as well as localized text items (indicated with the note This property supports localization) stored in the field's TextItems collection.

See Also