<?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 Automatically populate field with values from another layer in ArcGIS Server with JavaScript API Questions</title>
    <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816650#M387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I would like how I could do to autopopulate some fields in a Feature Server according to spatial values from another layers. For instance, if I add a point and has a Distict field, I want to fill that field automatically with the name of the district where the point is, from a district layer.&lt;/P&gt;&lt;P&gt;Tha aim of this is to be used in an application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Mar 2016 10:11:04 GMT</pubDate>
    <dc:creator>EduardoD__Cuesta</dc:creator>
    <dc:date>2016-03-02T10:11:04Z</dc:date>
    <item>
      <title>Automatically populate field with values from another layer</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816650#M387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I would like how I could do to autopopulate some fields in a Feature Server according to spatial values from another layers. For instance, if I add a point and has a Distict field, I want to fill that field automatically with the name of the district where the point is, from a district layer.&lt;/P&gt;&lt;P&gt;Tha aim of this is to be used in an application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 10:11:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816650#M387</guid>
      <dc:creator>EduardoD__Cuesta</dc:creator>
      <dc:date>2016-03-02T10:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populate field with values from another layer</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816651#M388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you are wanting to do is possible but pretty complicated.&lt;/P&gt;&lt;P&gt;Here is my recommended workflow steps that you would have to do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Use the edit toolbar inorder to add your new feature.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/ed_feature_creation.html" title="https://developers.arcgis.com/javascript/jssamples/ed_feature_creation.html"&gt;Edit without editor widget | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;P&gt;2. In the draw-end function before the &lt;SPAN class="pln" style="color: #595959;"&gt;selectedTemplate&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;featureLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;applyEdits you would need to query the districts layer to see if the point you placed intersects.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;3. For that you would use a QueryTask and a Query class that would use the geometry from step two and the SPATIAL_REL_INTERSECTS&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;4. Once you have results from that query you can get the results[0].attributes.District and put that in a var.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;5. Then update the newAttributes array to replace the existing District value with the new on retrieved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;6. Then you can finally the &lt;SPAN class="pln" style="color: #595959;"&gt;selectedTemplate&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;featureLayer&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #666600;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;applyEdits.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;&lt;SPAN class="pln" style="color: #595959;"&gt;If you can not comprehend this workflow then this is probably something you will need to hire a developer/consultant company for as I mentioned this is possible but is not something that is easy.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 14:35:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816651#M388</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-02T14:35:45Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populate field with values from another layer</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816652#M389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where is this data hosted? Is it hosted on ArcGIS Online or on your own local ArcGIS for Server server?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2016 19:19:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816652#M389</guid>
      <dc:creator>JacobTodd1</dc:creator>
      <dc:date>2016-03-02T19:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populate field with values from another layer</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816653#M390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jacob,&lt;/P&gt;&lt;P&gt;The data are in a sde Oracle database, it is Feature Server in ArcGIS server.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 04:48:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816653#M390</guid>
      <dc:creator>EduardoD__Cuesta</dc:creator>
      <dc:date>2016-03-03T04:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populate field with values from another layer</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816654#M391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eduardo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your response. Since you are utilizing an SDE Oracle geodatabase as well as ArcGIS for Server, I would suggest that you do some research into database triggers. I have included a few resources regarding this topic below. Please keep in mind that configuring these triggers will not be supported by Esri Technical&amp;nbsp; Support. I hope these resources will at least get you on the right track!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.esri.com/EN/knowledgebase/techarticles/detail/34972" title="http://support.esri.com/EN/knowledgebase/techarticles/detail/34972"&gt;34972 - Use an Oracle trigger on a table to update an st_geometry attribute&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-oracle/feature-class-storage-oracle.htm" title="http://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-oracle/feature-class-storage-oracle.htm"&gt;Feature classes in a geodatabase in Oracle—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2016 13:33:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816654#M391</guid>
      <dc:creator>JacobTodd1</dc:creator>
      <dc:date>2016-03-03T13:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically populate field with values from another layer</title>
      <link>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816655#M392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much, I will have a look.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Mar 2016 04:35:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-server-with-javascript-api-questions/automatically-populate-field-with-values-from/m-p/816655#M392</guid>
      <dc:creator>EduardoD__Cuesta</dc:creator>
      <dc:date>2016-03-06T04:35:42Z</dc:date>
    </item>
  </channel>
</rss>

