The <Field> Tag
Every field in the Schema.xml starts with the CoaxName and the EsriName. After those two tags, you have the opportunity to add more tags to determine behavior, set the data type, and establish validation rules.
Importantly, some fields are solely maintained by the application, and thus, their settings should not be changed in the Schema.xml. These fields are noted in the topic Attribute Editing Parameters.
Finally, all tags have a default value. By excluding the tag entirely, you are setting it to its default value. For example, the default value of the Import tag is “false.” You could either include import=“false”, or not add the tag at all. Both configurations would mean the data for that field is not imported from the GIS.
Tag |
Description |
Example |
Default Value |
---|---|---|---|
CoaxName |
The name of the field on the DHFC data object referenced in the CoaxName field of the parent <Table> tag. |
CoaxName="PoleType" |
null |
EsriName |
The name of the field on the feature service layer referenced in the EsriDesignName or EsriBuiltName parent <Table> tag. IMPORTANT: The
value in this attribute should be the actual field name, not its alias.
|
EsriName="PoleType" |
null |
Import |
Determines whether data from the field should be imported from the GIS and into DHFC when building a design. Certain fields are required to import data and expect this tag to be set to true. Changing it to false prevents the application from functioning correctly. In the topic Attribute Editing Parameters, these fields note that their import setting cannot be changed. |
Import="true" Import=“false” |
“false” |
Editable |
Determines whether data in the field should be editable by the user in DHFC. Certain fields cannot be set to editable. These fields are found in the topic Attribute Editing Parameters. |
Editable="true" Editable=“false” |
“false” |
Viewable |
Determines whether data in a field should be viewable by the user in DHFC. In order to be viewable, the field must also be set to import (if it does not already have special handling by the application, for example, if the application retrieves the data from somewhere besides the GIS). If a field is set to be editable, it is inherently viewable regardless of the setting in the Schema.xml. |
Viewable="true" Viewable=“false” |
“false” |
FriendlyName |
Allows the administrator to supply an alias or user-friendly name for the field when it is displayed in the Attribute Editor. Friendly names must be string values. |
FriendlyName=“Pole Type” |
null |
DataType |
Determines the data type for the field in the Attribute Editor. The following options are valid (the entries in the Schema.xml are not case sensitive):
|
DataType= “int32” |
“string” |
CodedDomainName |
This is used to specify which <CodedValueDomain> to use for this field. |
CodedDomainName= “PoleType” And, the Schema.xml would have a <CodedValueDomain> called PoleType that lists all available types. |
null |
Validation Tags
There is a subset of validation tags that an administrator can apply to fields that appear in the attribute editor. This helps bolster data quality by establishing maximum and minimum values, maximum character limits, and setting fields to required.
Validation Tag |
Works with this Data Type |
Description |
Example |
---|---|---|---|
MaxLength |
string |
Allows you to limit the number of characters |
MaxLength=“40” |
MinValue |
int, int32, int64, double |
Establishes the minimum, allowable value |
MinValue=“1” |
MaxValue |
int, int32, int64, double |
Establishes the maximum, allowable value |
MaxValue=“12” |
Required |
string |
Establishes the field as required; the user is unable to save the attribute edits without supplying a value for the field |
Required=“true” |
Display Order Tag
If you view the Attribute Editing Parameters, you see the editable fields listed in the Attribute Editor. You can configure the display order using the DisplayOrder tag. By default, all fields have a value of “100” as their order. A low value means the field appears toward the top of the Attribute Editor, and a high value means the field appears toward the bottom of the Attribute Editor. For example, look at the following code block snippet (this is an incomplete code block to solely demonstrate the DisplayOrder tag):
<Table CoaxName="SupportStructureData" EsriDesignName="SupportStructure" EsriBuiltName="SupportStructure">
<Field CoaxName="EsriId" EsriName="OBJECTID" Import="true" />
<Field CoaxName="NetworkId" EsriName="NetworkId" Import="true" />
<Field CoaxName="PoleType" EsriName="PoleType" DisplayOrder="5" />
<Field CoaxName="CommercialCount" EsriName="CommercialCount" DisplayOrder="15"
<Field CoaxName="ResidentialCount" EsriName="ResidentialCount" DisplayOrder="10"
With those DisplayOrder tags configured, PoleType with
a value of “5” would appear first, ResidentialCount
with a value of “10” would appear second, and CommercialCount
with a value of “15” would appear third.
Example of Many Tags
The following code block is a snippet for SupportStructure (this is an incomplete code block to merely give a flavor of what various tags look like together). Notice in particular how PoleType’s CodedDomainName is set to PoleType, which is the same name as the CodedValueDomain listed with actual value entries:
<CodedValueDomain CoaxName="PoleType">
<CodedValueEntry CoaxName="CableOnly" EsriName="0" />
<CodedValueEntry CoaxName="PowerAndPhone" EsriName="3" />
<CodedValueEntry CoaxName="MidSpan" EsriName="6" />
<CodedValueEntry CoaxName="Demarcation" EsriName="7" />
</CodedValueDomain>
<Table CoaxName="SupportStructureData" EsriDesignName="SupportStructure" EsriBuiltName="SupportStructure">
<Field CoaxName="EsriId" EsriName="OBJECTID" Import="true" />
<Field CoaxName="NetworkId" EsriName="NetworkId" Import="true" />
<Field CoaxName="PoleType" EsriName="PoleType" FriendlyName="Pole Type" Viewable="true" CodedDomainName="PoleType" Import="true" />
<Field CoaxName="RiserDistance" EsriName="RiserDistance" Import="true" />
<Field CoaxName="ResidentialCount" EsriName="ResidentialCount" FriendlyName="Residential Count" Viewable="true" DataType="Int32" MinValue="0" Import="true" />
<Field CoaxName="Workflow_Status" EsriName="Workflow_Status"
/Table>