<?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: How to Save FeatureCollection to Portal Using SaveAsAsync in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-save-featurecollection-to-portal-using/m-p/514912#M6336</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used one of the existing sample, "FeatureCollectionLayerFromQuery", modified it to save the created feature collection from the feature layer (&lt;A class="link-titled" href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0" title="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0"&gt;Layer: Wildfire Response Points (ID: 0)&lt;/A&gt;&amp;nbsp;) to the portal. Before using FeatureCollection.SaveAsAsync() method, you need to log in to the portal as below. Attached is the complete project. Once the code is executed, you will see a new item named, &lt;SPAN&gt;"Feature Collection to Portal&lt;/SPAN&gt;" is added in the portal that copies all the features from the feature layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var tokenServiceUri = new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest&lt;/A&gt;&lt;SPAN&gt;"); // url for generating token&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AuthenticationManager authManager = AuthenticationManager.Current;&lt;BR /&gt; var cred = await authManager.GenerateCredentialAsync(tokenServiceUri, "&amp;lt;portal_user_name&amp;gt;", "&amp;lt;portal_password&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Open a portal item containing a feature collection&lt;BR /&gt; ArcGISPortal portal = await ArcGISPortal.CreateAsync(tokenServiceUri, cred);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureCollectionLayer featCollectionTable = new FeatureCollectionLayer(featCollection);&lt;BR /&gt; await featCollectionTable.LoadAsync();&lt;BR /&gt; MyMapView.Map.OperationalLayers.Add(featCollectionTable);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List&amp;lt;string&amp;gt; str = new List&amp;lt;string&amp;gt;();&lt;BR /&gt; str.Add("Save Feature collection");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt; {&lt;BR /&gt; await featCollection.SaveAsAsync(portal, null, "Feature Collection to Portal", "FeatureCollection", str);&lt;BR /&gt; MessageBox.Show("Feature Collection saved to portal");&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;catch(Exception ex)&lt;BR /&gt; {&lt;BR /&gt; MessageBox.Show(ex.Message);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nagma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 20 Aug 2017 02:02:41 GMT</pubDate>
    <dc:creator>NagmaYasmin</dc:creator>
    <dc:date>2017-08-20T02:02:41Z</dc:date>
    <item>
      <title>How to Save FeatureCollection to Portal Using SaveAsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-save-featurecollection-to-portal-using/m-p/514911#M6335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Could you show the whole workflow to save FeatureCollection to Portal ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 07:03:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-save-featurecollection-to-portal-using/m-p/514911#M6335</guid>
      <dc:creator>xiaoguangyan</dc:creator>
      <dc:date>2017-08-17T07:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to Save FeatureCollection to Portal Using SaveAsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-save-featurecollection-to-portal-using/m-p/514912#M6336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have used one of the existing sample, "FeatureCollectionLayerFromQuery", modified it to save the created feature collection from the feature layer (&lt;A class="link-titled" href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0" title="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0"&gt;Layer: Wildfire Response Points (ID: 0)&lt;/A&gt;&amp;nbsp;) to the portal. Before using FeatureCollection.SaveAsAsync() method, you need to log in to the portal as below. Attached is the complete project. Once the code is executed, you will see a new item named, &lt;SPAN&gt;"Feature Collection to Portal&lt;/SPAN&gt;" is added in the portal that copies all the features from the feature layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var tokenServiceUri = new Uri("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fwww.arcgis.com%2Fsharing%2Frest" rel="nofollow" target="_blank"&gt;https://www.arcgis.com/sharing/rest&lt;/A&gt;&lt;SPAN&gt;"); // url for generating token&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;AuthenticationManager authManager = AuthenticationManager.Current;&lt;BR /&gt; var cred = await authManager.GenerateCredentialAsync(tokenServiceUri, "&amp;lt;portal_user_name&amp;gt;", "&amp;lt;portal_password&amp;gt;");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Open a portal item containing a feature collection&lt;BR /&gt; ArcGISPortal portal = await ArcGISPortal.CreateAsync(tokenServiceUri, cred);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureCollectionLayer featCollectionTable = new FeatureCollectionLayer(featCollection);&lt;BR /&gt; await featCollectionTable.LoadAsync();&lt;BR /&gt; MyMapView.Map.OperationalLayers.Add(featCollectionTable);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List&amp;lt;string&amp;gt; str = new List&amp;lt;string&amp;gt;();&lt;BR /&gt; str.Add("Save Feature collection");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try&lt;BR /&gt; {&lt;BR /&gt; await featCollection.SaveAsAsync(portal, null, "Feature Collection to Portal", "FeatureCollection", str);&lt;BR /&gt; MessageBox.Show("Feature Collection saved to portal");&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;catch(Exception ex)&lt;BR /&gt; {&lt;BR /&gt; MessageBox.Show(ex.Message);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nagma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Aug 2017 02:02:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-save-featurecollection-to-portal-using/m-p/514912#M6336</guid>
      <dc:creator>NagmaYasmin</dc:creator>
      <dc:date>2017-08-20T02:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to Save FeatureCollection to Portal Using SaveAsAsync</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/how-to-save-featurecollection-to-portal-using/m-p/514913#M6337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Nagma&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 20 Aug 2017 13:42:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/how-to-save-featurecollection-to-portal-using/m-p/514913#M6337</guid>
      <dc:creator>xiaoguangyan</dc:creator>
      <dc:date>2017-08-20T13:42:01Z</dc:date>
    </item>
  </channel>
</rss>

