<?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: Editing a File Geodatabase via LocalServer, can't edit attributes in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/editing-a-file-geodatabase-via-localserver-can-t/m-p/676365#M8518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should add that I tried to manually recreated the Attribute key/value pairs from the schema, populate them, and commit, but that did not work. No exceptions, just the changes were ignored.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Nov 2015 22:19:55 GMT</pubDate>
    <dc:creator>ShaneBrennan</dc:creator>
    <dc:date>2015-11-11T22:19:55Z</dc:date>
    <item>
      <title>Editing a File Geodatabase via LocalServer, can't edit attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/editing-a-file-geodatabase-via-localserver-can-t/m-p/676364#M8517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to edit a file geodatabase that is referenced from a map package that I load through a LocalFeatureService. The file geodatabase is not within the map package, it is referencing the file geodatabase which resides elsewhere on disk. Note that due to our workflow, using the SQLite-based .geodatabase format is not an option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am able to create a MapPoint and add it to the ServiceFeatureTable that represents the points that exist as a feature class in the file geodatabase. I can apply my edits and it shows up in my map and in ArcMap when the file geodatabase is loaded there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I can't seem to edit attributes in code. Below is a summary of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//set up our service and all tables and feature layers
LocalFeatureService _lfs = await LocalFeatureService.StartAsync(@"D:\dev\HelloWorldMap\HelloWorldMap\Assets\Data\test.mpk");
var url = _lfs.UrlFeatureService;
ServiceFeatureTable _sft = await ServiceFeatureTable.OpenAsync(new Uri(url + "/0"), null, SpatialReference.Create(3857));
_pointsLayer = new FeatureLayer
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; ID = "Points",
&amp;nbsp;&amp;nbsp;&amp;nbsp; DisplayName = "Points",
&amp;nbsp;&amp;nbsp;&amp;nbsp; FeatureTable = _sft
};

//add the point layer to the map
MyMap.Layers.Add(_pointsLayer);

//create a feature using the ServiceFeatureTable's schema...the schema shows the proper fields.
var feature = new GeodatabaseFeature(_sft.Schema); //after this line and before line 21, feature.Attributes is an empty dictionary!
var point = new MapPoint(0, 0);
feature.Geometry = point;

//add the feature to the file geodatabase
long id = await _sft.AddAsync(feature);

//At this point feature.Attributes only shows OBJECTID in the dictionary collection, and it's value is -10
//No other attributes are showing even though the feature.Schema shows all proper fields!

//oh well, let's commit anyway. After this call, the point is added 
//permanently to the geodatabase, it's OBJECTID is set as expected, and all other fields are &amp;lt;null&amp;gt;.
var editResult = await _sft.ApplyEditsAsync();&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:30:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/editing-a-file-geodatabase-via-localserver-can-t/m-p/676364#M8517</guid>
      <dc:creator>ShaneBrennan</dc:creator>
      <dc:date>2021-12-12T04:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Editing a File Geodatabase via LocalServer, can't edit attributes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/editing-a-file-geodatabase-via-localserver-can-t/m-p/676365#M8518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I should add that I tried to manually recreated the Attribute key/value pairs from the schema, populate them, and commit, but that did not work. No exceptions, just the changes were ignored.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2015 22:19:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/editing-a-file-geodatabase-via-localserver-can-t/m-p/676365#M8518</guid>
      <dc:creator>ShaneBrennan</dc:creator>
      <dc:date>2015-11-11T22:19:55Z</dc:date>
    </item>
  </channel>
</rss>

