<?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 Convert a field name into a variable to substitue in feature selection and field calc in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/convert-a-field-name-into-a-variable-to-substitue/m-p/744449#M24451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey All, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Model Builder, I am updating point attributes after a spatial join to a polygon layer.&amp;nbsp; Both input feature classes are paramaters, so after the spatial join, a new temporary feature class is created.&amp;nbsp; I then do a tabular join from the point table back to the temporary join table based on the object_id, so that I can now update several fields in the point data that may be incorrect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to be able to create a table view where Trans.TRANS.ROAD.ZONE &amp;lt;&amp;gt; TRANS_SpatialJoin1.ZONE_1, and then calculate Trans.TRANS.ROAD.ZONE = TRANS_SpatialJoin1.ZONE_1&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is the next time I run the model, the field names are different:&amp;nbsp; Comm.COMM.ROAD.ZONE and TRANS_SpatialJoin1.ZONE_1&amp;nbsp; So, my table selection and subsequent field calculation functions are dependant on strict field names and are both broken internally in the model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I make a variable, %zone% for a field name that can be used to both create a table view AND can also be used in field calculation?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]17699[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Sep 2012 15:27:14 GMT</pubDate>
    <dc:creator>MattFrancis</dc:creator>
    <dc:date>2012-09-14T15:27:14Z</dc:date>
    <item>
      <title>Convert a field name into a variable to substitue in feature selection and field calc</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/convert-a-field-name-into-a-variable-to-substitue/m-p/744449#M24451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey All, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In Model Builder, I am updating point attributes after a spatial join to a polygon layer.&amp;nbsp; Both input feature classes are paramaters, so after the spatial join, a new temporary feature class is created.&amp;nbsp; I then do a tabular join from the point table back to the temporary join table based on the object_id, so that I can now update several fields in the point data that may be incorrect.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to be able to create a table view where Trans.TRANS.ROAD.ZONE &amp;lt;&amp;gt; TRANS_SpatialJoin1.ZONE_1, and then calculate Trans.TRANS.ROAD.ZONE = TRANS_SpatialJoin1.ZONE_1&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is the next time I run the model, the field names are different:&amp;nbsp; Comm.COMM.ROAD.ZONE and TRANS_SpatialJoin1.ZONE_1&amp;nbsp; So, my table selection and subsequent field calculation functions are dependant on strict field names and are both broken internally in the model.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I make a variable, %zone% for a field name that can be used to both create a table view AND can also be used in field calculation?&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]17699[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Sep 2012 15:27:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/convert-a-field-name-into-a-variable-to-substitue/m-p/744449#M24451</guid>
      <dc:creator>MattFrancis</dc:creator>
      <dc:date>2012-09-14T15:27:14Z</dc:date>
    </item>
  </channel>
</rss>

