Configuring the Collect Features Task
Using the Collect Features task , the field-worker can choose from a dictionary of feature types that are based on the map layers that you have chosen to be editable in the project. The Collect Features task displays a list of feature types to choose from and then guides field-workers through the process of collecting both the shape and attributes for their new feature.
For a feature layer to be editable, it must be stored inside a geodatabase (personal or multiuser ArcSDE geodatabase) and must also contain a GlobalID field. You can choose the transaction model that best suits your workflow. Note that versioning information set for the layer in the ArcMap .mxd document will be used by the Synchronize task in the application. Note that your data does not need to versioned to edit it.
Feature Types
When defining a map, you can configure the feature layers of a mobile service so that they can be used by different tasks in the application. The Collect Features task derives feature types from feature layers in the map service or mobile cache that are marked as editable. A feature type equates to an item in the legend of the renderer that is chosen to display a feature layer in ArcMap. For example, if you choose a unique value renderer to display the types of valves in a water valve layer, each symbol and text associated with the legend item (each valve type) appears as a feature type in the Collect Features task.
Feature types are derived from one of two types of renderers used in ArcMap to display features contained within a layer:
- Simple renderer
- Unique value renderer
Layers that display features using a simple renderer contain a single feature type. Attribute fields for the feature type may contain default values that are assigned to a new feature that is created. These field values are presented in the attribute form.
Feature types are most commonly derived from layers rendered by unique values. Each unique value is based on one or more field values. Each unique value is considered a feature type in the Collect Features task. It is possible to group unique values in a map layer using ArcMap; however, the grouping is not represented in the feature type list. Note that the field used to create the feature type is not displayed when setting attribute values.
To reduce the number of feature types your field-workers use in the application, you should only mark as editable the layers that will be updated in the field in a given project.
Attributes
How you have defined your data model determines the way that you interact with feature attributes in the Collect Features Task. Field properties such as Allow Nulls, Domains and Default Values define the attribute editing experience:
- Allow Nulls—The default setting for most databases is that a field will allow null values (AllowNulls = True). However it is possible to set the value to a field equal to False. By doing so, you are establishing an attribute collection rule - that a value must be entered before creating a feature. Within the ArcGIS Mobile field applications, if a field is marked AllowNulls = False, you must set a value for the field or you will not be allowed to create a new feature.
- Domains—for text and numeric fields you can add business logic to the editing experience. Coded-value domains define a pick list of valid values for a field. Likewise Range domains establish a valid range for numeric values to be entered. Within the ArcGIS Mobile field applications, coded-value domains result in a pick list for the field-worker and range domains are validated at the time of editing.
- Default Values—important to creating a new feature is the ability to set (or not set) a default value for a field. A default value is a valid value for the field type that is applied when a new feature is created. The ArcGIS Mobile applications not only apply default values but if you purposely do not create a default value and either set the field to AllowNulls = False or add a coded-value domain to the field the applications will treat the field as required.
Configuring Layer Properties
The Collect Features Task derives feature types from all operational map layers marked as editable within your project. So to configure the Collect Features Task you must configure the feature layers within your mobile map. The configurable properties are located on the General, Viewable Fields, Editable Fields, and GPS Collection tabs that appear when you open an operational map layer and click on a specific feature layer.
They include the following:
- Make Layer Editable property on the General tab—Only feature layers with the editable property checked are used by the Collect Features task.
- Fields on the Editable Fields tab—When collecting or updating a feature, the list of fields, the order in which they appear, and the caption used to represent them are configured on the Editable Fields tab.
- GPS settings on the GPS Collection Settings tab—If using a GPS receiver to collect features using the Collect Features task, you can configure the behavior of the collection method and control the accuracy of the GPS positions used in generating point or vertex locations created by the GPS Averaging and GPS Streaming collection methods.