<?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 Modelbuilder - Add and Calculate Fields in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807242#M137</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to construct a model that will iterate through a folder containing subfolders of shapefiles (NOT in a geodatabase), add a field to each of them, and calculate values for that field.&amp;nbsp; What I have constructed, instead, is a model that correctly adds the field to every shapefile but calculates the values for only the first shapefile.&amp;nbsp; The others are left with zeroes.&amp;nbsp; I suspect this is something quite simple, but I don't know what I'm doing wrong.&amp;nbsp; Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Artemis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 May 2012 22:43:32 GMT</pubDate>
    <dc:creator>J_Hatton</dc:creator>
    <dc:date>2012-05-30T22:43:32Z</dc:date>
    <item>
      <title>Modelbuilder - Add and Calculate Fields</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807242#M137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to construct a model that will iterate through a folder containing subfolders of shapefiles (NOT in a geodatabase), add a field to each of them, and calculate values for that field.&amp;nbsp; What I have constructed, instead, is a model that correctly adds the field to every shapefile but calculates the values for only the first shapefile.&amp;nbsp; The others are left with zeroes.&amp;nbsp; I suspect this is something quite simple, but I don't know what I'm doing wrong.&amp;nbsp; Thanks for your help!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Artemis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 22:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807242#M137</guid>
      <dc:creator>J_Hatton</dc:creator>
      <dc:date>2012-05-30T22:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder - Add and Calculate Fields</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807243#M138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you share your model so we can take a look at it?&amp;nbsp; I assume you're using an iterator, such as Iterate Feature Class, (which will work with shapefiles), and then building your model off of that.&amp;nbsp; What values are you calculating into the field?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 May 2012 23:43:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807243#M138</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2012-05-30T23:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder - Add and Calculate Fields</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807244#M139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what's the best way to show the model- I can't do a screen grab.&amp;nbsp; I'm attaching the zipped toolbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, I am using Iterate Feature Class.&amp;nbsp; I have a bit of code in the Calculate Field tool that populates the field with sequential numbers beginning with 1.&amp;nbsp;&amp;nbsp; It works a treat for that first shapefile.&amp;nbsp; I have also tried running the model with just the number 3 being put into that field, and again, it works for the first shapefile but the others remain 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The input variable is currently defined as a workspace, but I have also tried using "Folder" as the input variable and get the same result.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Artemis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 16:45:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807244#M139</guid>
      <dc:creator>J_Hatton</dc:creator>
      <dc:date>2012-05-31T16:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Modelbuilder - Add and Calculate Fields</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807245#M140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;.......anyone?..................crickets...........................&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2012 22:26:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/modelbuilder-add-and-calculate-fields/m-p/807245#M140</guid>
      <dc:creator>J_Hatton</dc:creator>
      <dc:date>2012-06-01T22:26:13Z</dc:date>
    </item>
  </channel>
</rss>

