<?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 Re: Model Builder Iteration in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870044#M2103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to&amp;nbsp;try the For iterator with Calculate Value tool to generate each sql expression, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate Value expression:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"YEARS BETWEEN {} AND {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;n&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;n&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;With the For set to be 0 to 2 by 1 you'd get these expressions on each iteration, which you then would pipe into a Select Layer by Attributes or Select tool:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;YEARS BETWEEN 0 AND 9
YEARS BETWEEN 10 AND 19
YEARS BETWEEN 20 AND 29‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" title="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;SQL reference for query expressions used in ArcGIS—ArcGIS Pro | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/modelbuilder-toolbox/examples-of-using-iterators-in-modelbuilder.htm#GUID-C0E9F998-C1DE-4D52-9FCE-13543FBC0FCB" title="http://pro.arcgis.com/en/pro-app/tool-reference/modelbuilder-toolbox/examples-of-using-iterators-in-modelbuilder.htm#GUID-C0E9F998-C1DE-4D52-9FCE-13543FBC0FCB" rel="nofollow noopener noreferrer" target="_blank"&gt;Examples of using iterators in ModelBuilder—Tools | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:50:56 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2021-12-12T10:50:56Z</dc:date>
    <item>
      <title>Model Builder Iteration</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870043#M2102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, i'm using Modelbuilder too analyse a point feture class. &lt;/P&gt;&lt;P&gt;Goal is to iterate different sql expressions out of a tabel to select various features of the point feature class.&lt;/P&gt;&lt;P&gt;Question: is there a possibility to name the output of the selection referring the sql expression out of the iterator.&lt;/P&gt;&lt;P&gt;using the variable %Value% doesnt work because there a spaces in the sql expression (example: YEARS BETWEEN 0 AND 9)&lt;/P&gt;&lt;P&gt;is there a possibility to use for example a different column for the naming?&lt;/P&gt;&lt;P&gt;Currently used iterator: Iterate Field Values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 09:41:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870043#M2102</guid>
      <dc:creator>FelixBuchinger</dc:creator>
      <dc:date>2018-01-15T09:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder Iteration</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870044#M2103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to&amp;nbsp;try the For iterator with Calculate Value tool to generate each sql expression, for example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate Value expression:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"YEARS BETWEEN {} AND {}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;n&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt;n&lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;With the For set to be 0 to 2 by 1 you'd get these expressions on each iteration, which you then would pipe into a Select Layer by Attributes or Select tool:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;YEARS BETWEEN 0 AND 9
YEARS BETWEEN 10 AND 19
YEARS BETWEEN 20 AND 29‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" title="http://pro.arcgis.com/en/pro-app/help/mapping/navigation/sql-reference-for-elements-used-in-query-expressions.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;SQL reference for query expressions used in ArcGIS—ArcGIS Pro | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/modelbuilder-toolbox/examples-of-using-iterators-in-modelbuilder.htm#GUID-C0E9F998-C1DE-4D52-9FCE-13543FBC0FCB" title="http://pro.arcgis.com/en/pro-app/tool-reference/modelbuilder-toolbox/examples-of-using-iterators-in-modelbuilder.htm#GUID-C0E9F998-C1DE-4D52-9FCE-13543FBC0FCB" rel="nofollow noopener noreferrer" target="_blank"&gt;Examples of using iterators in ModelBuilder—Tools | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:50:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870044#M2103</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T10:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder Iteration</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870045#M2104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;this is working, but not bringing the solution to the main problem.&lt;/P&gt;&lt;P&gt;Even with this way you can't name the output of the Select tool after an iterated input. Like Tool: Select --&amp;gt; Name of the output feature class: "OutputSelect_%Output_Value%" (not working because of the spaces in "YEARS BETWEEN 0 AND 9"). Using the %Value% out of the Iterator `for` doesnt make it any better because then there is only writen "0", "1" an so on... (This can be reached by putting n into the output name of the select tool: "OutputSelect_%n%")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So is there a possibility to tell the iterater so output another column of the iteration tabel?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all the help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 09:03:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870045#M2104</guid>
      <dc:creator>FelixBuchinger</dc:creator>
      <dc:date>2018-01-16T09:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder Iteration</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870046#M2105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use another Calculate Value tool to insert spaces as follows&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;"%SQL Expr%"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;replace&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"_"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;this would convert your expression to the string:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;YEARS_BETWEEN_0_AND_9
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and use the created variable in your output name instead of %n%:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:50:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870046#M2105</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-12T10:50:59Z</dc:date>
    </item>
    <item>
      <title>Re: Model Builder Iteration</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870047#M2106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much! That helped a lot &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:02:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/model-builder-iteration/m-p/870047#M2106</guid>
      <dc:creator>FelixBuchinger</dc:creator>
      <dc:date>2018-01-17T14:02:23Z</dc:date>
    </item>
  </channel>
</rss>

