<?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 IF THEN Statements in Modelbuilder Help in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/if-then-statements-in-modelbuilder-help/m-p/763852#M127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have some Calculate Field tools in a model that are using IF THEN expressions in VB originally created in 9.3. Now they aren't working in 10. I searched and searched and found out that taking out the dim aValue &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;as Integer&lt;/SPAN&gt;&lt;SPAN&gt; fixed some of my expressions, but not all. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I currently have this expression that seems extremely straight-forward, but won't work in Modelbuilder. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim Potential
IF [gisdata_gis_BLDG_BUSINESS_SWBusinessType] Like "Mobile*" THEN
&amp;nbsp;&amp;nbsp;&amp;nbsp; Potential = 0
ElseIf [gisdata_gis_BLDG_BUSINESS_SWBusinessType] = "Municipal" THEN
&amp;nbsp;&amp;nbsp;&amp;nbsp; Potential = 0
Else 
Potential = 1
EndIf&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is wrong with my code? Or, what is wrong with Modelbuilder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I can look at that tells me what the changes are between VBScripting in 9.3 vs 10?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:27:36 GMT</pubDate>
    <dc:creator>KevinHigh</dc:creator>
    <dc:date>2021-12-12T08:27:36Z</dc:date>
    <item>
      <title>IF THEN Statements in Modelbuilder Help</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/if-then-statements-in-modelbuilder-help/m-p/763852#M127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have some Calculate Field tools in a model that are using IF THEN expressions in VB originally created in 9.3. Now they aren't working in 10. I searched and searched and found out that taking out the dim aValue &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;as Integer&lt;/SPAN&gt;&lt;SPAN&gt; fixed some of my expressions, but not all. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I currently have this expression that seems extremely straight-forward, but won't work in Modelbuilder. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Dim Potential
IF [gisdata_gis_BLDG_BUSINESS_SWBusinessType] Like "Mobile*" THEN
&amp;nbsp;&amp;nbsp;&amp;nbsp; Potential = 0
ElseIf [gisdata_gis_BLDG_BUSINESS_SWBusinessType] = "Municipal" THEN
&amp;nbsp;&amp;nbsp;&amp;nbsp; Potential = 0
Else 
Potential = 1
EndIf&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is wrong with my code? Or, what is wrong with Modelbuilder?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I can look at that tells me what the changes are between VBScripting in 9.3 vs 10?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:27:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/if-then-statements-in-modelbuilder-help/m-p/763852#M127</guid>
      <dc:creator>KevinHigh</dc:creator>
      <dc:date>2021-12-12T08:27:36Z</dc:date>
    </item>
  </channel>
</rss>

