<?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: boolean precontition for collect values, odd behavior in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454970#M15309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you for checking and confirm that it is a type of bug in model builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand about using the wildcard but i wanted something like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="lol.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/210847_lol.PNG" style="width: 620px; height: 277px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope they fix it soon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Jul 2016 17:09:59 GMT</pubDate>
    <dc:creator>MarceloOyuela</dc:creator>
    <dc:date>2016-07-06T17:09:59Z</dc:date>
    <item>
      <title>boolean precontition for collect values, odd behavior</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454968#M15307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using model builder to search rasters containing specific strings in the name within a folder.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="cpt3.PNG" class="image-1 jive-image" height="336" src="https://community.esri.com/legacyfs/online/210681_cpt3.PNG" style="height: 340px; width: 766.545px;" width="758" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is to use the iterator in all raster in a folder, then run the "collect values" only if the precondition is true: "% Name%". find ("45") !=1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works to some degree, always adds the first raster represented in the folder. In this case I look for the raster with the letters "45", the &lt;STRONG&gt;collect value&lt;/STRONG&gt; ignores everything other than "45" except the first thing in this case &lt;EM&gt;"prec_1.asc_26.tif"&lt;/EM&gt;. (See the result of the collect value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the &lt;STRONG&gt;"recursive&lt;/STRONG&gt;" option in the iterator, the output show as follows:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="tp5.PNG" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/210682_tp5.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This creates a huge problem because I can not use other tools with that output. (Cell statistics "or others).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7ed529;"&gt;&lt;EM&gt;Note: I understand that I can use the wildcard, but this is a small example and I want to use several preconditions in the same model.&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you please help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank You Very Much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2016 21:30:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454968#M15307</guid>
      <dc:creator>MarceloOyuela</dc:creator>
      <dc:date>2016-07-04T21:30:38Z</dc:date>
    </item>
    <item>
      <title>Re: boolean precontition for collect values, odd behavior</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454969#M15308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Even thought you show it correctly in the model builder label you say your Calculate Value tool is testing the expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"% Name%". find ("45") !=1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Should it not be&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"% Name%". find ("45") !=&lt;STRONG&gt;-&lt;/STRONG&gt;1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I spoofed up the same model as you (although I was searching a folder of ASC files) and was able to replicate the same problem in ArcGIS 10.4.1. I too got an erroneous layer added in. I got rid of the Calculate Value tool and used a wild card in the iterator, this worked and only the files that fulfilled my search criteria where added to the collects Value list. So I think you would need to use the wild card approach as it looks like a bug in Modelbuilder. You could expose the wild card parameter as a parameter so you could change your search criteria if the model is run as a tool. As your model stands this is not a major change and makes it work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 10:41:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454969#M15308</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-07-06T10:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: boolean precontition for collect values, odd behavior</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454970#M15309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks you for checking and confirm that it is a type of bug in model builder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand about using the wildcard but i wanted something like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="lol.PNG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/210847_lol.PNG" style="width: 620px; height: 277px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope they fix it soon&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2016 17:09:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454970#M15309</guid>
      <dc:creator>MarceloOyuela</dc:creator>
      <dc:date>2016-07-06T17:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: boolean precontition for collect values, odd behavior</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454971#M15310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at your image you could try splitting this up into 3 sub-models, each sub-model using the appropriate wild card feeding into the collects value tool. Just an idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jul 2016 11:14:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/boolean-precontition-for-collect-values-odd/m-p/454971#M15310</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2016-07-08T11:14:47Z</dc:date>
    </item>
  </channel>
</rss>

