<?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 insert all tables in calculate value tool model builder in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1208604#M227</link>
    <description>&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;P&gt;I cannot figure out how to insert all the dbf files for the code block in calculate value tool. After iterating through all files I use the expression below to get the two coefficient values in each dbf file and store them as two seperate coefficient value variable. I will then insert these values one dbf file at a time in raster calculator and multiple by a raster to generate interpolation maps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression:&amp;nbsp;values[0]&lt;/P&gt;
&lt;P&gt;Code block:for dbf_file in '%Iterate through tables and collect all dbf files%':&lt;BR /&gt;with arcpy.da.SearchCursor(dbf_file,["Coef"]) as cursor:&lt;BR /&gt;values = sorted({row[0] for row in cursor})&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_0-1662023376249.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50105i6CE9A2C5F610A504/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_0-1662023376249.png" alt="VasudhaChaturvedi_0-1662023376249.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_1-1662024811179.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50107i8C6B18E7DEF8134D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_1-1662024811179.png" alt="VasudhaChaturvedi_1-1662024811179.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also tried it with python but I get an error.&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_0-1662024613544.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50106i70ED88F90034F61B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_0-1662024613544.png" alt="VasudhaChaturvedi_0-1662024613544.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me out figuring out a way to attain my goal.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 21 Jun 2023 13:08:42 GMT</pubDate>
    <dc:creator>VasudhaChaturvedi</dc:creator>
    <dc:date>2023-06-21T13:08:42Z</dc:date>
    <item>
      <title>insert all tables in calculate value tool model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1208604#M227</link>
      <description>&lt;DIV class=""&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;P&gt;I cannot figure out how to insert all the dbf files for the code block in calculate value tool. After iterating through all files I use the expression below to get the two coefficient values in each dbf file and store them as two seperate coefficient value variable. I will then insert these values one dbf file at a time in raster calculator and multiple by a raster to generate interpolation maps.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression:&amp;nbsp;values[0]&lt;/P&gt;
&lt;P&gt;Code block:for dbf_file in '%Iterate through tables and collect all dbf files%':&lt;BR /&gt;with arcpy.da.SearchCursor(dbf_file,["Coef"]) as cursor:&lt;BR /&gt;values = sorted({row[0] for row in cursor})&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_0-1662023376249.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50105i6CE9A2C5F610A504/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_0-1662023376249.png" alt="VasudhaChaturvedi_0-1662023376249.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_1-1662024811179.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50107i8C6B18E7DEF8134D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_1-1662024811179.png" alt="VasudhaChaturvedi_1-1662024811179.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have also tried it with python but I get an error.&amp;nbsp;&lt;/P&gt;
&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_0-1662024613544.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50106i70ED88F90034F61B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_0-1662024613544.png" alt="VasudhaChaturvedi_0-1662024613544.png" /&gt;&lt;/span&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone help me out figuring out a way to attain my goal.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 21 Jun 2023 13:08:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1208604#M227</guid>
      <dc:creator>VasudhaChaturvedi</dc:creator>
      <dc:date>2023-06-21T13:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: insert all tables in calculate value tool model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1208634#M228</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have solved the issue of itering through dbf files, getting the two coefficient values in each file and inserting the two values in raster calculator.The following is the procedure: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1- Creating a sub model for iterating through tables,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_0-1662035124463.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50111iE0A04D8F74507B50/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_0-1662035124463.png" alt="VasudhaChaturvedi_0-1662035124463.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2- creating a sub model to get both the coefficient values and add the sub model to the iterate dbf files model as shown in previous image,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_3-1662035230264.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50112i51E30991BBD4275B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_3-1662035230264.png" alt="VasudhaChaturvedi_3-1662035230264.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3- Create two sub models for iterating through both list of coefficient values,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_4-1662035253807.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50113iAE43FF8B52BECA78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_4-1662035253807.png" alt="VasudhaChaturvedi_4-1662035253807.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4- Lastly, create a final model with the raster calculator using the last two sub model where we itertae through the list of both coefficient values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_5-1662035275109.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50114iC5C2F3CE9D96DDD9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_5-1662035275109.png" alt="VasudhaChaturvedi_5-1662035275109.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The challange I face now is how to iterate through the names of dbf files and use the names to save the interpolation rasters. The first model provides the names of rasters in the variable name but how I can insert these names in the last model with raster calculator. Is there a way?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_0-1662035404644.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50115iCF0F3E1C651C4507/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_0-1662035404644.png" alt="VasudhaChaturvedi_0-1662035404644.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 12:30:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1208634#M228</guid>
      <dc:creator>VasudhaChaturvedi</dc:creator>
      <dc:date>2022-09-01T12:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: insert all tables in calculate value tool model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1208917#M229</link>
      <description>&lt;P&gt;You have the iteration backwards, the sub model should do the calculations (including raster calculator) and write the output, the driver (outside) model should do the iteration. See the examples in the help.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 21:48:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1208917#M229</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2022-09-01T21:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: insert all tables in calculate value tool model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1209688#M230</link>
      <description>&lt;P&gt;thank you helped a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 15:13:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1209688#M230</guid>
      <dc:creator>VasudhaChaturvedi</dc:creator>
      <dc:date>2022-09-05T15:13:36Z</dc:date>
    </item>
    <item>
      <title>Re: insert all tables in calculate value tool model builder</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1209691#M231</link>
      <description>&lt;P&gt;&lt;SPAN&gt;The answer to this question was just use copy tool and rename the files using the name variable from the iterate tables itself. I have further simplified the model.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_0-1662390887230.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50457iA499F420B6A08651/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_0-1662390887230.png" alt="VasudhaChaturvedi_0-1662390887230.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VasudhaChaturvedi_1-1662390910253.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/50458i2486B001927FFFAD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VasudhaChaturvedi_1-1662390910253.png" alt="VasudhaChaturvedi_1-1662390910253.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 05 Sep 2022 15:15:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/insert-all-tables-in-calculate-value-tool-model/m-p/1209691#M231</guid>
      <dc:creator>VasudhaChaturvedi</dc:creator>
      <dc:date>2022-09-05T15:15:21Z</dc:date>
    </item>
  </channel>
</rss>

