<?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 OnRowCreated on FeatureService in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792160#M1608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the OnRowCreated event to set attribute values when a feature is created in the map. This is working fine when the data source is a feature class in a file geodatabase. It is, however, not working when the data source is a versioned feature service feature class (A utility network service). I get no errors, but my attributes is not populated with data after the OnRowCreated event is handled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Jun 2017 13:14:25 GMT</pubDate>
    <dc:creator>JonasEngedal1</dc:creator>
    <dc:date>2017-06-28T13:14:25Z</dc:date>
    <item>
      <title>OnRowCreated on FeatureService</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792160#M1608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the OnRowCreated event to set attribute values when a feature is created in the map. This is working fine when the data source is a feature class in a file geodatabase. It is, however, not working when the data source is a versioned feature service feature class (A utility network service). I get no errors, but my attributes is not populated with data after the OnRowCreated event is handled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR Jonas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 13:14:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792160#M1608</guid>
      <dc:creator>JonasEngedal1</dc:creator>
      <dc:date>2017-06-28T13:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowCreated on FeatureService</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792161#M1609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reading the documentation lead me to the answer &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProConcepts-Editing#edit-session" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Pro Concepts &amp;gt; Edit Session&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;When the datasource is a feature service, edit operations are performed in a short transaction. The result is that once the CreateRow method, which triggers the OnRowCreated event, is called on a feature, it will commit the new feature in one single call to the feature service before the OnRowCreated event is triggered. Further changes to the feature, done during handling the OnRowCreated event, will not be committed unless the Store method is called on the feature resulting in another call to the feature service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added this code after I have done the necessary changes to the row/feature in the OnRowCreated event handler:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; serviceConnectionProperties &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; rowChangedEventArgs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Row&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetTable&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetDatastore&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetConnector&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ServiceConnectionProperties&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;serviceConnectionProperties &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; rowChangedEventArgs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Row&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Store&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is however not optimal as creating the feature and adding my edits to the attributes are performed in two transactions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to accomplish this in one transaction? I have heard someone mention edit session variables that automatically can be set on the created features. Kind of like the edit user that is assigned to the feature.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:05:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792161#M1609</guid>
      <dc:creator>JonasEngedal1</dc:creator>
      <dc:date>2021-12-12T09:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowCreated on FeatureService</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792162#M1610</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonas,&lt;/P&gt;&lt;P&gt;What version of Pro and the utility network are you using here?&lt;/P&gt;&lt;P&gt;With regards to your other question, &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/enable-editor-tracking.htm"&gt;Editor Tracking&lt;/A&gt; can be used to record edits on datasets.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Jun 2017 16:40:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792162#M1610</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-06-29T16:40:28Z</dc:date>
    </item>
    <item>
      <title>Re: OnRowCreated on FeatureService</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792163#M1611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am running Pro 1.4-beta.1.utility.network+build.7199.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Editor Tracking is only enabling standard fields to be auto updated. I am interested in custom fields for foreign keys to external systems that my add-in is integrating to. I need the features to be created and assigned a foriegn key in one transaction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jun 2017 06:35:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/onrowcreated-on-featureservice/m-p/792163#M1611</guid>
      <dc:creator>JonasEngedal1</dc:creator>
      <dc:date>2017-06-30T06:35:17Z</dc:date>
    </item>
  </channel>
</rss>

