<?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: ServiceFeatureTable AddAsync call returns -10 and fails on ApplyEditsAsync in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605683#M7431</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I attempted the workaround but there seems to be a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First there are times in which we do not have a z value for the mappoint therefore we used double.NaN (the default value of a pointz) and it had the same problem.&amp;nbsp; Then we tried to use a special value so that we recognize that it has not been instantiated yet, we chose double.MinValue.&amp;nbsp; Then when we used graphic.ToJson() it was in scientific notation which is also not accepted in a RestQuery.&amp;nbsp; This is a major problem especially if we have small elevation values like 0.0000000000001.&amp;nbsp; Is there a work around for this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Sep 2016 18:21:41 GMT</pubDate>
    <dc:creator>JeniferCochran1</dc:creator>
    <dc:date>2016-09-12T18:21:41Z</dc:date>
    <item>
      <title>ServiceFeatureTable AddAsync call returns -10 and fails on ApplyEditsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605678#M7426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have seen other posts where the fix was to add the following during the creation of a FeatureLayer:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;myFeatureTable.OutFields = Esri.ArcGISRuntime.Tasks.Query.OutFields.All;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if (_sft.OutFields == null)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _sft.OutFields = new Esri.ArcGISRuntime.Tasks.Query.OutFields();
}
foreach (FieldInfo fi in _sft.Schema.Fields)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _sft.OutFields.Add(fi.Name);
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried both suggestions but still result in a failure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some of the exceptions include:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Response status code does not indicate success: 500 (Server Error). (On ApplyEditsAsync)&lt;/LI&gt;&lt;LI&gt;The shape must not have a Z value. (On AddAsync)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;We tried multiple attempts to save a MapPoint to the ServiceFeatureTable but the most bizarre case was the following attempt:&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Our table consists of a PointZ Shape type.&amp;nbsp; We tried to save a MapPoint that was constructed = new MapPoint(2, 3, 0, SpatialReferences.Wgs84).&amp;nbsp; Then when trying to AddAsync it would fail with the following exception:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception:&lt;/P&gt;&lt;P&gt;The shape must not have a Z value. :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;StackTrace:&lt;BR /&gt;at RuntimeCoreNet.Interop.HandleException(Boolean retVal) at RuntimeCoreNet.CoreFeatureSource.InsertRow(Byte[] attributeBytes, UInt32 byteCount, UInt32 attributeCount, ICoreGeometry geometry) at Esri.ArcGISRuntime.Data.FeatureTable.Add(Feature feature) at Esri.ArcGISRuntime.Data.FeatureTable.&amp;lt;&amp;gt;c__DisplayClassb.b__a() at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which doesn't make sense since the schema says PointZ type.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;///currSFT is the ServiceFeatureTable object&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var recNo = Task.Run(() =&amp;gt; currSFT.AddAsync(feature)).Result;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var updateResult = Task.Run(() =&amp;gt; currSFT.ApplyEditsAsync()).Result;&lt;BR /&gt;}&lt;BR /&gt;catch (Exception ex)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //was unable to save&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp;&amp;nbsp;&amp;nbsp; So on a second attempt we tried the following MapPoint: new MapPoint(3, 4, double.NaN, SpatialReferences.Wgs84);&lt;BR /&gt;When we try to AddAsync this MapPoint, AddAsync returns a row ID of -10.&amp;nbsp; Then it will throw when calling ApplyEditsAsync with an exception stating Response status code does not indicate success: 500 (Server Error).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would this occur? I did notice when creating the MapPoint it behaves differently depending which constructor I would use.&amp;nbsp; I am wondering if there is documentation on why runtime would treat an object differently depending on which constructor is used?&amp;nbsp; As well as how to save my MapPoint to the table via the ServiceFeatureTable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:41:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605678#M7426</guid>
      <dc:creator>JeniferCochran</dc:creator>
      <dc:date>2021-12-12T16:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceFeatureTable AddAsync call returns -10 and fails on ApplyEditsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605679#M7427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jenifer,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;There&amp;nbsp;are known issues with this in &lt;A href="https://developers.arcgis.com/net/desktop/guide/release-notes-10-2-6.htm"&gt;10.2.6&lt;/A&gt; and &lt;A href="https://developers.arcgis.com/net/desktop/guide/release-notes.htm"&gt;10.2.7&lt;/A&gt;. Basically it's not possible to store geometries with Z values through ServiceFeatureTable directly. You should be able to store features without Z like is defined in a workaround in 10.2.6 doc. If you need to add Z values at the moment, you need to use /applyEdits endpoint directly described in &lt;A _jive_internal="true" href="https://community.esri.com/message/555693#555693"&gt;dicussion about M values&lt;/A&gt;&amp;nbsp;which also relates to Z values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are sorry for the inconvenience and we are looking forward to support this in next major release.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 08:36:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605679#M7427</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2016-09-09T08:36:11Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceFeatureTable AddAsync call returns -10 and fails on ApplyEditsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605680#M7428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When is the next major release scheduled for Runtime .net? Or are you talking about the Quartz release?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 13:34:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605680#M7428</guid>
      <dc:creator>JeniferCochran</dc:creator>
      <dc:date>2016-09-09T13:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceFeatureTable AddAsync call returns -10 and fails on ApplyEditsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605681#M7429</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I was talking about Quartz and it's scheduled to be out quite soon. I cannot give exact date but 'upcoming months'. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 13:57:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605681#M7429</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2016-09-09T13:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceFeatureTable AddAsync call returns -10 and fails on ApplyEditsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605682#M7430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about a patch for Runtime .Net? Is that in the future?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Sep 2016 14:02:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605682#M7430</guid>
      <dc:creator>JeniferCochran</dc:creator>
      <dc:date>2016-09-09T14:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: ServiceFeatureTable AddAsync call returns -10 and fails on ApplyEditsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605683#M7431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I attempted the workaround but there seems to be a problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First there are times in which we do not have a z value for the mappoint therefore we used double.NaN (the default value of a pointz) and it had the same problem.&amp;nbsp; Then we tried to use a special value so that we recognize that it has not been instantiated yet, we chose double.MinValue.&amp;nbsp; Then when we used graphic.ToJson() it was in scientific notation which is also not accepted in a RestQuery.&amp;nbsp; This is a major problem especially if we have small elevation values like 0.0000000000001.&amp;nbsp; Is there a work around for this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 18:21:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/servicefeaturetable-addasync-call-returns-10-and/m-p/605683#M7431</guid>
      <dc:creator>JeniferCochran1</dc:creator>
      <dc:date>2016-09-12T18:21:41Z</dc:date>
    </item>
  </channel>
</rss>

