<?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 addFeatureAsync should return the OBJECTID of the added feature? in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addfeatureasync-should-return-the-objectid-of-the/m-p/1026552#M5428</link>
    <description>&lt;P&gt;I have a geodatabase that I'm storing data to. When I add a new feature I need to know its OBJECTID right away as that is my only Primary Key in the table but the ListenableFuture currently returns a Void object.&lt;/P&gt;&lt;P&gt;Normally with SQLite, this &lt;STRONG&gt;is&lt;/STRONG&gt;&amp;nbsp;the expected behavior on record insertion with a returned ROWID (-1 on failure).&lt;/P&gt;&lt;P&gt;Am I missing something? Also, what would be a possible workaround?&lt;/P&gt;&lt;P&gt;I know I could maybe query for the latest OBJECTID after my feature is added but is there another way?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
    <pubDate>Sat, 13 Feb 2021 10:03:41 GMT</pubDate>
    <dc:creator>AmanSaryal</dc:creator>
    <dc:date>2021-02-13T10:03:41Z</dc:date>
    <item>
      <title>addFeatureAsync should return the OBJECTID of the added feature?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addfeatureasync-should-return-the-objectid-of-the/m-p/1026552#M5428</link>
      <description>&lt;P&gt;I have a geodatabase that I'm storing data to. When I add a new feature I need to know its OBJECTID right away as that is my only Primary Key in the table but the ListenableFuture currently returns a Void object.&lt;/P&gt;&lt;P&gt;Normally with SQLite, this &lt;STRONG&gt;is&lt;/STRONG&gt;&amp;nbsp;the expected behavior on record insertion with a returned ROWID (-1 on failure).&lt;/P&gt;&lt;P&gt;Am I missing something? Also, what would be a possible workaround?&lt;/P&gt;&lt;P&gt;I know I could maybe query for the latest OBJECTID after my feature is added but is there another way?&lt;/P&gt;&lt;P&gt;TIA&lt;/P&gt;</description>
      <pubDate>Sat, 13 Feb 2021 10:03:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addfeatureasync-should-return-the-objectid-of-the/m-p/1026552#M5428</guid>
      <dc:creator>AmanSaryal</dc:creator>
      <dc:date>2021-02-13T10:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: addFeatureAsync should return the OBJECTID of the added feature?</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addfeatureasync-should-return-the-objectid-of-the/m-p/1027399#M5432</link>
      <description>&lt;P&gt;Hi AmanSaryal,&lt;/P&gt;&lt;P&gt;You should be able to get the OBJECTID from the feature attributes immediately after the feature is added to the geodatabase.&lt;/P&gt;&lt;LI-CODE lang="java"&gt;feature.getAttributes().get("OBJECTID")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;If you are working with ServiceFeatureTable instead of GeodatabaseFeatureTable and want to get the ObjectID after performing applyEdits, then you can call&lt;STRONG&gt;&lt;EM&gt; `feature.refresh()`&amp;nbsp;&lt;/EM&gt;&lt;/STRONG&gt;before getting the objectID from attributes.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rama&lt;/P&gt;</description>
      <pubDate>Tue, 16 Feb 2021 23:54:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/addfeatureasync-should-return-the-objectid-of-the/m-p/1027399#M5432</guid>
      <dc:creator>RamaChintapalli</dc:creator>
      <dc:date>2021-02-16T23:54:25Z</dc:date>
    </item>
  </channel>
</rss>

