Interface IMapTableInfo

Namespace
ESRI.ArcGIS.Carto
Assembly
ESRI.Server.Carto.dll

Provides access to the Table Info.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("08AB1BE0-D464-4882-A721-D72FBB36903A")]
public interface IMapTableInfo

Properties

DisplayField

Primary display field.

string DisplayField { get; }

Property Value

string

Remarks

When DisplayExpression is used in the source map document, MapServer returns the first field used in the expression.

Fields

Array of attribute fields contained in the table.

IFields Fields { get; }

Property Value

IFields

Remarks

Note: ObjectID field is always included even when the field is invisible in the source map document.

HTMLPopupType

Indicates if the layer has HTML popups enabled.

esriServerHTMLPopupType HTMLPopupType { get; }

Property Value

esriServerHTMLPopupType

Remarks

StandaloneTable does not support HTMLPopup

HasAttachments

Indicates if the layer has attachments.

bool HasAttachments { get; }

Property Value

bool

HasSubtype

Indicates if the layer has Subtype.

bool HasSubtype { get; }

Property Value

bool

Remarks

Note: in case when the subtype field name is invisible in the source map document, HasSubtype will return False even though the layer has Subtypes.

ID

The table ID. This is a unique ID among layers and tables, and is used to identify the table in a number of methods.

int ID { get; }

Property Value

int

Name

Descriptive name of the table.

string Name { get; }

Property Value

string

OIDFieldName

The name of the OID Field.

string OIDFieldName { get; }

Property Value

string

RelateInfos

Array of relates associated to the table.

IRelateInfos RelateInfos { get; }

Property Value

IRelateInfos

Remarks

In order for MapServer to advertise a relationship, both source and destination layer/standalone table must be added to the source map document. For example, Layer A is related to Table B in the GeoDatabase; Layer A is added to the map while Table B is not, in this scenario, MapServer will not publicize this relationship and therefore QueryRelatedRows function cannot be used to get related row(s) for feature from Layer A.

[C#]

Example: Printing a list of all relates a layer or table is participating

IRelateInfos pRIs = null;
IRelateInfo pRI = null;

pRIs = pMTI.RelateInfos;

if (pRIs == null)
{
    Console.WriteLine("No relationship is available"); 
    return;
}



for (int j = 0; j < pRIs.Count; j++)
{
    pRI = pRIs.get_Element(j);
    Console.WriteLine(pRI.Name + ", " + pRI.RelationshipID + ", " + pRI.RelatedTableID);
}