Connect to a service and list versions of the geodatabase.
Use case
As part of a multi-user editing scenario, you can check with the server to see how many versions of the geodatabase are outstanding before syncing.
How to use the sample
When the sample loads, a list of geodatabase versions and their properties will be displayed.
How it works
- Create a geoprocessing task referring to a GPServer with a ListVersions task.
- Use the task to create default parameters.
- Use the created parameters to create a job.
- Run the job to get a
GeoprocessingResult
. - Get a list of geoprocessing features from the Versions output parameter of the results.
- Format the geodatabase versions for display.
Relevant API
- GeoprocessingFeatures
- GeoprocessingFeatures.Features
- GeoprocessingJob
- GeoprocessingJob.GetResultAsync
- GeoprocessingParameters
- GeoprocessingResult
- GeoprocessingResult.Outputs
- GeoprocessingTask
- GeoprocessingTask.CreateDefaultParametersAsync
- GeoprocessingTask.CreateJob
About the data
The sample uses a sample geoprocessing service hosted on ArcGIS Online.
Additional information
ArcGIS Server does not include a geoprocessing service for listing geodatabase versions. You must configure one using the steps defined in Geoprocessing service example: list, create, and delete geodatabase versions in the ArcMap documentation.
Tags
conflict resolution, data management, database, multi-user, sync, version
Sample Code
<UserControl
x:Class="ArcGIS.UWP.Samples.ListGeodatabaseVersions.ListGeodatabaseVersions"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
<Grid>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<TextBlock Text="Current versions" Grid.Row="0" HorizontalAlignment="Center"/>
<TextBox x:Name="theTextBox" Grid.Row="1" TextWrapping="Wrap" ScrollViewer.VerticalScrollBarVisibility="Visible" />
</Grid>
<Grid x:Name="busyOverlay" Visibility="Collapsed" Background="#8C000000" Grid.RowSpan="4">
<Border HorizontalAlignment="Center" VerticalAlignment="Center" Padding="10" Background="#FFC6C4C4">
<Grid>
<ProgressBar IsIndeterminate="True" x:Name="progress" Height="20" />
<TextBlock Text="Getting versions from the geoprocessing task..." HorizontalAlignment="Left" Margin="5" Height="Auto" />
</Grid>
</Border>
</Grid>
</Grid>
</UserControl>