<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Offline Sync geodatabase: empty table / feature layer results in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1356655#M12358</link>
    <description>&lt;P&gt;Follow up question, not sure if I should make a new topic, but now I am trying to read the fields / attributes from the table after it has been loaded. I keep getting "null" as a response. There is data in the table. Is there something else I need to call to load the actual values themselves?&lt;/P&gt;&lt;P&gt;edit: &lt;A href="https://community.esri.com/t5/net-maps-sdk-questions/read-table-values-from-offline-goedatabase/m-p/1357173/thread-id/12361#M12362" target="_self"&gt;solved&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2023 18:40:28 GMT</pubDate>
    <dc:creator>MoyerSolutions</dc:creator>
    <dc:date>2023-12-06T18:40:28Z</dc:date>
    <item>
      <title>Offline Sync geodatabase: empty table / feature layer results</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1354393#M12349</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;I need an offline syncable geodatabase. I am trying to read fields from a geodatabase, but the results are empty.&amp;nbsp; None of the fields load.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-11-28 14_52_31-Window.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87367iE536E4E0FAD5D134/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-11-28 14_52_31-Window.png" alt="2023-11-28 14_52_31-Window.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The table has fields, I'd expect to see these headers:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-11-28 15_13_38-Window.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87368iEFDC84DBFF8F073C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-11-28 15_13_38-Window.png" alt="2023-11-28 15_13_38-Window.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My code is effectively the same as the sample from the ArcGIS.WinUI.Samples.GeodatabaseTransactions&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private async Task GetLocalGeodatabase()
{
    // Get the path to the local geodatabase for this platform (temp directory, for example).
    string localGeodatabasePath = GetGdbPath();

    try
    {
        // See if the geodatabase file is already present.
        if (File.Exists(localGeodatabasePath))
        {
            // If the geodatabase is already available, open it, hide the progress control, and update the message.
            _localGeodatabase = await Geodatabase.OpenAsync(localGeodatabasePath);
            LoadingProgressBar.Visibility = Visibility.Collapsed;
            MessageTextBlock.Text = "Using local geodatabase from '" + _localGeodatabase.Path + "'";
        }
        else
        {
            // Create a new GeodatabaseSyncTask with the uri of the feature server to pull from.
            Uri uri = new Uri(SyncServiceUrl);
            GeodatabaseSyncTask gdbTask = await GeodatabaseSyncTask.CreateAsync(uri);

            // Create parameters for the task: layers and extent to include, out spatial reference, and sync model.
            GenerateGeodatabaseParameters gdbParams = await gdbTask.CreateDefaultGenerateGeodatabaseParametersAsync(_extent);
            gdbParams.OutSpatialReference = MyMapView.SpatialReference;
            gdbParams.SyncModel = SyncModel.Layer;
            gdbParams.LayerOptions.Clear();
            gdbParams.LayerOptions.Add(new GenerateLayerOption(0));
            gdbParams.LayerOptions.Add(new GenerateLayerOption(1));

            // Create a geodatabase job that generates the geodatabase.
            GenerateGeodatabaseJob generateGdbJob = gdbTask.GenerateGeodatabase(gdbParams, localGeodatabasePath);

            // Handle the job changed event and check the status of the job; store the geodatabase when it's ready.
            generateGdbJob.StatusChanged += (s, e) =&amp;gt;
            {
                // See if the job succeeded.
                if (generateGdbJob.Status == JobStatus.Succeeded)
                {
                    DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, () =&amp;gt;
                    {
                        // Hide the progress control and update the message.
                        LoadingProgressBar.Visibility = Visibility.Collapsed;
                        MessageTextBlock.Text = "Created local geodatabase";
                    });
                }
                else if (generateGdbJob.Status == JobStatus.Failed)
                {
                    DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, () =&amp;gt;
                    {
                        // Hide the progress control and report the exception.
                        LoadingProgressBar.Visibility = Visibility.Collapsed;
                        MessageTextBlock.Text = "Unable to create local geodatabase: " + generateGdbJob.Error.Message;
                    });
                }
            };

            // Start the generate geodatabase job.
            _localGeodatabase = await generateGdbJob.GetResultAsync();
        }
    }
    catch (Exception ex)
    {
        // Show a message for the exception encountered.
        DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, () =&amp;gt;
        {
            _ = new MessageDialog2("Unable to create offline database: " + ex.Message).ShowAsync();
        });
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Strangely enough it seems to loaded the Domains , so I know its downloaded the correct table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-11-28 15_10_57-Window.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87365i0BDDEEFC78179C80/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2023-11-28 15_10_57-Window.png" alt="2023-11-28 15_10_57-Window.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Editing is enabled in the service, and all users should be able to view features:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-11-28 15_29_06-Window.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87372i88C333512D0B9887/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-11-28 15_29_06-Window.png" alt="2023-11-28 15_29_06-Window.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Nov 2023 22:30:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1354393#M12349</guid>
      <dc:creator>MoyerSolutions</dc:creator>
      <dc:date>2023-11-28T22:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Offline Sync geodatabase: empty table / feature layer results</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1354719#M12351</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I have tried to make a smaller test case using&amp;nbsp;ServiceFeatureTable or through ServiceGeodatabase:. Results are same: empty table&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public static async Task ServiceGeodatabase() {
    var serviceGeodatabase = new ServiceGeodatabase(new Uri(featureServiceUri));
    await serviceGeodatabase.LoadAsync();

    ServiceFeatureTable table = serviceGeodatabase.GetTable(0);
    _ = table.Fields; //breakpoint here, why this is empty?
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-or-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public static async Task GetServiceTable() {
    ServiceFeatureTable table = new(new Uri(featureServiceUri));
    var layer = new FeatureLayer(table);
    _ = table.Fields; //breakpoint here, why this is empty?
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Nov 2023 17:44:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1354719#M12351</guid>
      <dc:creator>MoyerSolutions</dc:creator>
      <dc:date>2023-11-29T17:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Offline Sync geodatabase: empty table / feature layer results</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1355303#M12353</link>
      <description>&lt;P&gt;Are you calling&amp;nbsp;&lt;A href="https://developers.arcgis.com/net/api-reference/api/netfx/Esri.ArcGISRuntime/Esri.ArcGISRuntime.Data.FeatureTable.LoadAsync.html#Esri_ArcGISRuntime_Data_FeatureTable_LoadAsync" target="_self"&gt;LoadAsync&lt;/A&gt;&amp;nbsp;?&lt;/P&gt;&lt;P&gt;You need to explicitly Load tables/layers, etc&lt;/P&gt;</description>
      <pubDate>Thu, 30 Nov 2023 18:39:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1355303#M12353</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2023-11-30T18:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Offline Sync geodatabase: empty table / feature layer results</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1355993#M12354</link>
      <description>&lt;P&gt;That was it. Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 21:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1355993#M12354</guid>
      <dc:creator>MoyerSolutions</dc:creator>
      <dc:date>2023-12-01T21:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Offline Sync geodatabase: empty table / feature layer results</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1356655#M12358</link>
      <description>&lt;P&gt;Follow up question, not sure if I should make a new topic, but now I am trying to read the fields / attributes from the table after it has been loaded. I keep getting "null" as a response. There is data in the table. Is there something else I need to call to load the actual values themselves?&lt;/P&gt;&lt;P&gt;edit: &lt;A href="https://community.esri.com/t5/net-maps-sdk-questions/read-table-values-from-offline-goedatabase/m-p/1357173/thread-id/12361#M12362" target="_self"&gt;solved&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 18:40:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/offline-sync-geodatabase-empty-table-feature-layer/m-p/1356655#M12358</guid>
      <dc:creator>MoyerSolutions</dc:creator>
      <dc:date>2023-12-06T18:40:28Z</dc:date>
    </item>
  </channel>
</rss>

