<?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: IF Statements in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263804#M4334</link>
    <description>&lt;P&gt;Change some things on your Field Calculator window.&lt;/P&gt;&lt;P&gt;Expression should be "output"&lt;/P&gt;&lt;P&gt;The Code Block should be&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;dim output
IF [MAJOR_ST] = "") THEN
  output = "YES"
ELSEIF [MAJOR_ST] = "Farm" THEN
  output = "NO"
END IF&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Mar 2023 22:19:56 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2023-03-02T22:19:56Z</dc:date>
    <item>
      <title>IF Statements</title>
      <link>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263774#M4329</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am trying to populate a Text Field with a 'yes' or 'no' attribute based on the results of an IF Statement and am running into the Syntax error.&lt;/P&gt;&lt;P&gt;I have a field named 'MAJOR ST' in my street centerline table to create classes for my streets. This is the field I am basing the If statement off of. I have added a field to the table called CAR. This is the field I want to populate with 'yes' or 'no'. If the attribute in the MAJOR_ST field is empty, then CAR should be YES. If the attribute in the MAJOR_ST field is 'Farm', the CAR should be NO. This is the statement I came up with but is causing an Syntax error.&lt;/P&gt;&lt;P&gt;IF ([MAJOR_ST] = "") THEN&lt;BR /&gt;[CAR] = "YES"&lt;BR /&gt;ELSE IF&lt;BR /&gt;([MAJOR_ST] = 'Farm') THEN&lt;BR /&gt;[CAR] = "NO"&lt;BR /&gt;END IF&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SLouq_0-1677792192415.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/64219iED4CC24703E1B160/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SLouq_0-1677792192415.png" alt="SLouq_0-1677792192415.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can someone help me with this? All I want to do is populate the CAR field with a Yes or No&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 21:25:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263774#M4329</guid>
      <dc:creator>SLouq</dc:creator>
      <dc:date>2023-03-02T21:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statements</title>
      <link>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263790#M4330</link>
      <description>&lt;P&gt;You have to use double quotes&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;([MAJOR_ST] = "Farm") THEN&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Mar 2023 21:45:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263790#M4330</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-03-02T21:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statements</title>
      <link>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263793#M4331</link>
      <description>&lt;P&gt;Should my Field type for CAR be Text? I tried your suggestion and it still bombed. Also is my Expression field correct?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 21:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263793#M4331</guid>
      <dc:creator>SLouq</dc:creator>
      <dc:date>2023-03-02T21:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statements</title>
      <link>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263797#M4332</link>
      <description>&lt;P&gt;expression = myExpression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Dim myExpression
([MAJOR_ST] = "Farm") THEN
...&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Mar 2023 22:03:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263797#M4332</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2023-03-02T22:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statements</title>
      <link>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263801#M4333</link>
      <description>&lt;P&gt;That worked!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 22:15:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263801#M4333</guid>
      <dc:creator>SLouq</dc:creator>
      <dc:date>2023-03-02T22:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statements</title>
      <link>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263804#M4334</link>
      <description>&lt;P&gt;Change some things on your Field Calculator window.&lt;/P&gt;&lt;P&gt;Expression should be "output"&lt;/P&gt;&lt;P&gt;The Code Block should be&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;dim output
IF [MAJOR_ST] = "") THEN
  output = "YES"
ELSEIF [MAJOR_ST] = "Farm" THEN
  output = "NO"
END IF&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Mar 2023 22:19:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/if-statements/m-p/1263804#M4334</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-03-02T22:19:56Z</dc:date>
    </item>
  </channel>
</rss>

