Create, query and edit a specific server version using service geodatabase.
Workflows often progress in discrete stages, with each stage requiring the allocation of a different set of resources and business rules. Typically, each stage in the overall process represents a single unit of work, such as a work order or job. To manage these, you can create a separate, isolated version and modify it. Once this work is complete, you can integrate the changes into the default version.
Once loaded, the map will zoom to the extent of the feature layer. The current version is indicated at the top of the map. Tap "Create Version" to open a dialog to specify the version information (name, access, and description). See the Additional information section for restrictions on the version name.
Tap "Create" to create the version with the information that you specified. Select a feature to edit an attribute and/or tap a second time to relocate the point.
Tap the button in the top left corner to switch back and forth between the version you created and the default version. Edits will automatically be applied to your version when switching to the default version.
- Create and load a
ServiceGeodatabase
with a feature service URL that has enabled Version Management. - Get the
ServiceFeatureTable
from the service geodatabase. - Create a
FeatureLayer
from the service feature table. - Create
ServiceVersionParameters
with a unique name,VersionAccess
, and description.- Note - See the additional information section for more restrictions on the version name.
- Create a new version calling
ServiceGeodatabase.CreateVersionAsync
passing in the service version parameters. - Get the
Name
property from theServiceVersionInfo
of the version created. - Switch to the version you have just created using
ServiceGeodatabase.SwitchVersionAsync
, passing in the version name obtained from the service version info from step 6. - Select a
Feature
from the map to edit its "TYPDAMAGE" attribute and location. - Apply these edits to your version by calling
ServiceGeodatabase.ApplyEditsAsync
. - Switch back and forth between your version and the default version to see how the two versions differ.
- FeatureLayer
- ServiceFeatureTable
- ServiceGeodatabase
- ServiceGeodatabase.ApplyEditsAsync
- ServiceGeodatabase.CreateVersionAsync
- ServiceGeodatabase.SwitchVersionAsync
- ServiceVersionInfo
- ServiceVersionParameters
- VersionAccess
The feature layer used in this sample is Damage to commercial buildings located in Naperville, Illinois.
Credentials:
- Username: editor01
- Passowrd: editor01.password
The name of the version must meet the following criteria:
- Must not exceed 62 characters
- Must not include: Period (.), Semicolon (;), Single quotation mark ('), Double quotation mark (")
- Must not include a space for the first character
- Note - the version name will have the username and a period (.) prepended to it. E.g "editor01.MyNewUniqueVersionName"
Branch versioning access permission:
- VersionAccess.Public - Any portal user can view and edit the version.
- VersionAccess.Protected - Any portal user can view, but only the version owner, feature layer owner, and portal administrator can edit the version.
- VersionAccess.Private - Only the version owner, feature layer owner, and portal administrator can view and edit the version.
branch versioning, edit, version control, version management server