<?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: Add features successfully but the added features were not actually added. in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/add-features-successfully-but-the-added-features/m-p/1242172#M2646</link>
    <description>&lt;P&gt;Thank you MarkBaird. You are right. I forget a ApplyEdit call. It is working now.&lt;/P&gt;</description>
    <pubDate>Fri, 16 Dec 2022 22:26:34 GMT</pubDate>
    <dc:creator>lochd</dc:creator>
    <dc:date>2022-12-16T22:26:34Z</dc:date>
    <item>
      <title>Add features successfully but the added features were not actually added.</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/add-features-successfully-but-the-added-features/m-p/1241644#M2644</link>
      <description>&lt;P&gt;I am testing a Java client to add a feature into a feature layer on AGOL. When I run the client, it prints 'DONE add' (Please see the code logic) -&amp;gt; It means that the feature was added into the feature layer successfully, but I go to the Feature layer on AGOL to verify the added feature, I don't see the features that I added via the client.&lt;/P&gt;&lt;PRE&gt;// featureTable
ServiceFeatureTable featureTable = new ServiceFeatureTable(
		"https://services5.arcgis.com/IOshH1zLrIieqrNk/arcgis/rest/services/TestFeature2/FeatureServer/0?token=XXXXXXXXXX");

featureTable.addDoneLoadingListener(() -&amp;gt; {

	if (featureTable.getLoadStatus() == LoadStatus.LOADED) {

		// Feature attributes

		Map&amp;lt;String, Object&amp;gt; attributes = new HashMap&amp;lt;&amp;gt;();
		attributes.put("Name", "Record-" + System.currentTimeMillis());

		// Create a feature record with a Point
		Feature feature = featureTable.createFeature(attributes, new Point(-95, 40));

		// If can add?
		if (featureTable.canAdd()) {

			// Add feature
			featureTable.addFeatureAsync(feature).addDoneListener(() -&amp;gt; {

				System.out.println("DONE add");
			});

		} else {
			System.out.println("CAN'T add");
		}

	} else {

		System.out.println(featureTable.getLoadStatus());
	}

});

// Load featureTable
featureTable.loadAsync();&lt;/PRE&gt;&lt;P&gt;Please helps. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 15 Dec 2022 18:03:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/add-features-successfully-but-the-added-features/m-p/1241644#M2644</guid>
      <dc:creator>lochd</dc:creator>
      <dc:date>2022-12-15T18:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add features successfully but the added features were not actually added.</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/add-features-successfully-but-the-added-features/m-p/1241937#M2645</link>
      <description>&lt;P&gt;I think you are missing an ApplyEdits step.&lt;/P&gt;&lt;P&gt;If you take a look at this &lt;A href="https://github.com/Esri/arcgis-runtime-samples-java/tree/main/editing/add-features" target="_self"&gt;sample&lt;/A&gt; code you will see what needs to be done.&lt;/P&gt;&lt;P&gt;Does this help?&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 12:34:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/add-features-successfully-but-the-added-features/m-p/1241937#M2645</guid>
      <dc:creator>MarkBaird</dc:creator>
      <dc:date>2022-12-16T12:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add features successfully but the added features were not actually added.</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/add-features-successfully-but-the-added-features/m-p/1242172#M2646</link>
      <description>&lt;P&gt;Thank you MarkBaird. You are right. I forget a ApplyEdit call. It is working now.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Dec 2022 22:26:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/add-features-successfully-but-the-added-features/m-p/1242172#M2646</guid>
      <dc:creator>lochd</dc:creator>
      <dc:date>2022-12-16T22:26:34Z</dc:date>
    </item>
  </channel>
</rss>

