Configuring fields
When defining the properties of your operational feature layers, an important consideration is how fields are presented in the ArcGIS Mobile application. Effectively there are two presentations of fields:
- View Form—The View Form is a read-only representation of a feature. It is displayed when you identify, search, or browse for features.
- Edit Form—The Edit Form is displayed when collecting a new feature or editing the field values of an existing feature.
When inspecting a feature using the View Form, you can control what fields are displayed in the View Form and in what order, and define a caption that identifies the purpose of the field.
When editing a feature using the Edit Form, you can refine the field list to present only the fields that you require the field-worker to assign values to. As with the View Form, you can also reorder a field and set a caption for it.
The Caption property uses the field alias name set for the field in the map document that you author. You may want to use this property for the View Form caption. With the Edit Form, you can use the Caption property to pose a question to the field-worker. For example, a caption for a field representing the diameter of a water distribution main in the View Form may be "Diameter," whereas the Edit Form can display "What is the Diameter?".
Configuring viewable fields
For each feature layer, you can configure how the fields for that feature layer are displayed when you view and edit attributes. It is important to note that the list of fields that appears on both the Viewable Fields and Editable Fields tabs is determined by the list of viewable fields for the feature layer in the map document that you published as a mobile service. So if a field is missing from the list, check to make sure that it is indeed viewable in ArcMap.
When you click a feature to view its attributes, the list of fields appears the way that you have configured the fields using the options below. There are four key properties that you can configure:
- Field Visibility—You can turn on/off visibility of a specific field when displaying the attributes. This may be useful for fields you want to be viewable when collecting new features or editing attribute values but not when opening search results or identifying the feature.
- Caption—Each field has a caption property. This text appears inside the form when displaying the attribute of a feature. By default, the caption is populated by the field alias name; however, you can change this property so that it is more meaningful for the field-worker.
- Searchable—When using the search task against this feature layer, you can choose whether or not the specific field is searchable.
- Order—You can determine the order in which the fields appear when displaying the form. To change the field order, move a field above or below another field in the list.
Configuring editable fields
Similar to the Viewable Fields list, you can determine how and what fields appear when editing attributes. This is an important distinction because you may only want certain fields to be editable when collecting or updating features. For example, you may have default values associated with the construction of a new feature that you do not want to be altered. By configuring the list of editable fields, you can turn off the visibility of the fields that you do not want to be updated.
When you choose to edit features' attributes, the list of fields appears the way that you have configured the fields using the options below. Similar to the Viewable Fields list, there are three key properties that you can configure:
- Field Visibility—You can turn on/off visibility of a specific field when editing the attributes. You can use this property to control what can and cannot be updated in the field.
- Caption—Each field has a caption property. You can leverage this property to pose a question to the person capturing attribute values. For example, when viewing attributes of a light, you may want the caption to display "The Wattage is:", where you can provide an edit caption that poses a question like What is the Wattage?.
- Order—You can determine the order in which the fields appear. This property can be extremely valuable if one attribute choice can impact the decision made when populating another. By altering the order, you can present the list of fields to edit the way that the field-worker makes decisions in the field.
It is important to also note that there is validation of fields in the ArcGIS Mobile application. The field application enforces the following conditions:
- Range domains—If you try to enter a value outside a range domain, a message appears notifying you that the value is unacceptable and you must enter a valid value to continue.
- Coded value domains—If for some reason you did not set a default value to a field that is assigned a coded value domain, a message appears notifying you that you need to choose a valid value to continue.
- Allow Nulls False—It is possible to create a field that does not allow null values and to also not set a default value for the field. If this occurs, the field application forces the field user to enter a value before the feature can be modified.
If the Editable Fields list is unavailable and cannot be updated, the feature layer is most likely not editable. Click the General tab to ensure that the Make Layer Editable property is checked. If it is unchecked and you cannot check it, the data source of the feature layer may not meet the conditions for editing. Refer to the Feature Layer Configuration Properties for more information.