<?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: How to evaluate empty field? in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582663#M19277</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What you're trying to do is is something called &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00150000000t000000.htm"&gt;parameter validation &lt;/A&gt;&lt;SPAN&gt;-- and you can only do this with a script tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could write a very short Python script tool that just imports arcpy and calls your model, so you can set up validation on its arguments.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2012 15:35:54 GMT</pubDate>
    <dc:creator>curtvprice</dc:creator>
    <dc:date>2012-01-17T15:35:54Z</dc:date>
    <item>
      <title>How to evaluate empty field?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582662#M19276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a situation with ModelBuilder... I need to know if my field (street) has value or empty from selected features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have input parameter for the field (street), if the field is empty, I have to input (entry) a street name. Then calculate field.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;IF the field has value, if possible, make the street parameter entry disabled (even though I have set its type to optional in the model properties).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please help how to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 06:15:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582662#M19276</guid>
      <dc:creator>jonsosito</dc:creator>
      <dc:date>2012-01-17T06:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate empty field?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582663#M19277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What you're trying to do is is something called &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00150000000t000000.htm"&gt;parameter validation &lt;/A&gt;&lt;SPAN&gt;-- and you can only do this with a script tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could write a very short Python script tool that just imports arcpy and calls your model, so you can set up validation on its arguments.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 15:35:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582663#M19277</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-01-17T15:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate empty field?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582664#M19278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What you're trying to do is is something called &lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00150000000t000000.htm"&gt;parameter validation &lt;/A&gt;-- and you can only do this with a script tool.&lt;BR /&gt;&lt;BR /&gt;You could write a very short Python script tool that just imports arcpy and calls your model, so you can set up validation on its arguments.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you sir for your reply but this is only optional in my task. thanks also for the link ^_^&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The main problem is how may I determine if field 'Street' is empty (or null) before making an entry of street name, this is from a selected features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Please see my dialog box....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11239[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 23:44:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582664#M19278</guid>
      <dc:creator>jonsosito</dc:creator>
      <dc:date>2012-01-17T23:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate empty field?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582665#M19279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to have the tool simply not tromp any already-set values, within your model you could run a select features by attribute on the input table view (for blank or null values) before running calculate field.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Input table -&amp;gt; Select Layer By attribute -&amp;gt; (table)&amp;nbsp; -&amp;gt; Calculate Field -&amp;gt; (table) -&amp;gt; Select Layer By Attribute (clear selection)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would be less complicated than setting up a script tool and doing parameter validation as I suggested.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another thing you may want to try in your model is not do anything if zero or more than a certain amount of rows are selected, so you don't accidentally calculate all rows. This would be done using the Get Count tool, sending its output to calculate value with an expression like "%Count% &amp;gt; 0 or %Count% &amp;lt; 100", and using the output as a precondition:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Input table -&amp;gt; Select Layer By attribute -&amp;gt; (table) -&amp;gt; Get Count -&amp;gt; (count) -&amp;gt; Calculate value -&amp;gt; (output) -&amp;gt; [precondition] -&amp;gt; Calculate Field -&amp;gt; (table) -&amp;gt; Select Layer By Attribute (clear selection)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 20:00:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582665#M19279</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2012-01-18T20:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to evaluate empty field?</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582666#M19280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If you want to have the tool simply not tromp any already-set values, within your model you could run a select features by attribute on the input table view (for blank or null values) before running calculate field.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;Input table -&amp;gt; Select Layer By attribute -&amp;gt; (table)&amp;nbsp; -&amp;gt; Calculate Field -&amp;gt; (table) -&amp;gt; Select Layer By Attribute (clear selection)&lt;BR /&gt;&lt;BR /&gt;This would be less complicated than setting up a script tool and doing parameter validation as I suggested.&lt;BR /&gt;&lt;BR /&gt;Another thing you may want to try in your model is not do anything if zero or more than a certain amount of rows are selected, so you don't accidentally calculate all rows. This would be done using the Get Count tool, sending its output to calculate value with an expression like "%Count% &amp;gt; 0 or %Count% &amp;lt; 100", and using the output as a precondition:&lt;BR /&gt;&lt;BR /&gt;Input table -&amp;gt; Select Layer By attribute -&amp;gt; (table) -&amp;gt; Get Count -&amp;gt; (count) -&amp;gt; Calculate value -&amp;gt; (output) -&amp;gt; [precondition] -&amp;gt; Calculate Field -&amp;gt; (table) -&amp;gt; Select Layer By Attribute (clear selection)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks sir, you have given me a very good idea and I have managed to apply it to my ModelBuilder... see attached pic... this modelbuilder get-street-field-value, now I know if street field has value or null... this work for me even better! Thanks again... ^_^&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]11287[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 01:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/how-to-evaluate-empty-field/m-p/582666#M19280</guid>
      <dc:creator>jonsosito</dc:creator>
      <dc:date>2012-01-19T01:24:08Z</dc:date>
    </item>
  </channel>
</rss>

