<?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 Create New Feature, Populate a field based of ObjectID value in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/create-new-feature-populate-a-field-based-of/m-p/437096#M11281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an applicaiton Silverlight and when a users creates a new feature, I want to automatically populate a field called "FeatureID" with the value that was assigned in the ObjectID field (by ArcGIS).&amp;nbsp; I'm struggling with how to do this and I'm wondering if someone could give me a push or insight.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would love to do it on the back-end in the database schema (like how you do it for a domain and you have a default domain in your GDB but I don't think this is possilble so I'm looking to do it in code).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nathalie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Jun 2013 22:06:29 GMT</pubDate>
    <dc:creator>NathalieNeagle</dc:creator>
    <dc:date>2013-06-05T22:06:29Z</dc:date>
    <item>
      <title>Create New Feature, Populate a field based of ObjectID value</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/create-new-feature-populate-a-field-based-of/m-p/437096#M11281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an applicaiton Silverlight and when a users creates a new feature, I want to automatically populate a field called "FeatureID" with the value that was assigned in the ObjectID field (by ArcGIS).&amp;nbsp; I'm struggling with how to do this and I'm wondering if someone could give me a push or insight.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would love to do it on the back-end in the database schema (like how you do it for a domain and you have a default domain in your GDB but I don't think this is possilble so I'm looking to do it in code).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nathalie&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jun 2013 22:06:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/create-new-feature-populate-a-field-based-of/m-p/437096#M11281</guid>
      <dc:creator>NathalieNeagle</dc:creator>
      <dc:date>2013-06-05T22:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create New Feature, Populate a field based of ObjectID value</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/create-new-feature-populate-a-field-based-of/m-p/437097#M11282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you try to subscribe to Editor.EditCompleted event and in the Handler, test if action is 'Add' and update your attribute there?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jun 2013 16:32:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/create-new-feature-populate-a-field-based-of/m-p/437097#M11282</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2013-06-13T16:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Create New Feature, Populate a field based of ObjectID value</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/create-new-feature-populate-a-field-based-of/m-p/437098#M11283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dom,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply.&amp;nbsp; I fell off this task for awhile but now I'm back on and need to finish up.&amp;nbsp; After I listen for the Editor.EditCompleted event I then need to update the features attribute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was looking for answer on the rest api page.&amp;nbsp; Before I check this post I posted a question about the work-flow&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/89806-My-own-attribute-editing-function"&gt;http://forums.arcgis.com/threads/89806-My-own-attribute-editing-function&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here it is so you don't have to link over&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've been looking at the Apply Edits (Operation) example in the help document (REST API).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can take an example there and add a feature and update a feature -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/"&gt;http://help.arcgis.com/en/arcgisserver/10.0/apis/rest/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can add and update for the html. I do this by going to the end point&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sampleserver3.arcgisonline.co...r/0/applyEdits"&gt;http://sampleserver3.arcgisonline.co...r/0/applyEdits&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and dropping the appropriate code in the entry areas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I switch to JSON I can also get the JSON to work&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's where I'm no stuck&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I push an update from my code. Do you write everything in the url string&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;EXAMPLE - &lt;/SPAN&gt;&lt;A href="http://sampleserver3.arcgisonline.co...Edits/****HTML"&gt;http://sampleserver3.arcgisonline.co...Edits/****HTML&lt;/A&gt;&lt;SPAN&gt; OR JSON **TO DO WORK***&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or do you somehow give the url in your code&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://sampleserver3.arcgisonline.co...r/0/applyEdits"&gt;http://sampleserver3.arcgisonline.co...r/0/applyEdits&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;and then place your html or JSON in the appropriate input boxes -- "ADD, UPDATES, DELETES"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Will you show me an example of this - I'm writing in Silverlight but if the example was in JS or FLEX I'm sure I could figure it out.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to push with JSON&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example would be great to show me, I should be able to study that example and learn from that and do it on my own.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now I have this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;void EditorWidget_EditCompleted(object sender, Editor.EditEventArgs e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.Action == Editor.EditAction.Add)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach (var edit in e.Edits)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (edit.Layer is FeatureLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.Action == Editor.EditAction.Add)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .....udate feature layer with JSON update here&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not totally sure if that is correct but....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Nathallie.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 20:40:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/create-new-feature-populate-a-field-based-of/m-p/437098#M11283</guid>
      <dc:creator>NathalieNeagle</dc:creator>
      <dc:date>2013-08-02T20:40:55Z</dc:date>
    </item>
  </channel>
</rss>

