<?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 Quick field calculator IF question in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59272#M4706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I have a point FC with 2 text fields. 'Field 1' and 'Field 2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want Field 2 to = 5 IF Field 1 = E&lt;/P&gt;&lt;P&gt;and also&lt;/P&gt;&lt;P&gt;Field 2 to = 4 IF Field 1 = D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I've tried this but it returned a syntax error in geoprocessing results:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if [field1] = 'E' then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; result = "5"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I have any solutions in VB and python if possible? Will help me learn more!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcMap 10.5.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Nov 2017 10:44:25 GMT</pubDate>
    <dc:creator>TheodoreF</dc:creator>
    <dc:date>2017-11-16T10:44:25Z</dc:date>
    <item>
      <title>Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59272#M4706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I have a point FC with 2 text fields. 'Field 1' and 'Field 2'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want Field 2 to = 5 IF Field 1 = E&lt;/P&gt;&lt;P&gt;and also&lt;/P&gt;&lt;P&gt;Field 2 to = 4 IF Field 1 = D&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I've tried this but it returned a syntax error in geoprocessing results:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if [field1] = 'E' then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; result = "5"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I have any solutions in VB and python if possible? Will help me learn more!&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcMap 10.5.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 10:44:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59272#M4706</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2017-11-16T10:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59273#M4707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Theodore,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using python, you can do this by right-clicking on field 2 &amp;gt; Calculate Field. &amp;nbsp; Check Python at the top and 'Show Code Block'.&amp;nbsp; Enter the following in the first block:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;calc&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; field &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'E'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; field &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'D'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the second code block enter:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;calc&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;field name&lt;SPAN class="operator token"&gt;&amp;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;&lt;/P&gt;&lt;P&gt;Where &amp;lt;field name&amp;gt; is the name of Field1.&amp;nbsp; When specifying something 'equal to' you will want to use == rather than just =.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:14:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59273#M4707</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-10T22:14:57Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59274#M4708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lets not start with question pile on.&lt;/P&gt;&lt;P&gt;For your first question, try&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;cvt&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;field1&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; field1 &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'E'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;elif&lt;/SPAN&gt; field1 &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'D'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; out‍‍‍‍‍‍‍‍&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&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;In the field calculator, your Field2 needs to be an integer field.&amp;nbsp; That is where you are making the field calculation, so have it active, load the code block with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Parser.... python&amp;nbsp;&lt;/P&gt;&lt;P&gt;expression..... &amp;nbsp; cvt(!Field!)&lt;/P&gt;&lt;P&gt;assuming your field1 is actually called Field1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It can be simplified, but I wanted to emulate your request with the addition of returning a -9 in the first two conditions were not met&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:15:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59274#M4708</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-10T22:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59275#M4709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, works perfectly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 12:18:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59275#M4709</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2017-11-16T12:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59276#M4710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan,&lt;/P&gt;&lt;P&gt;Using your method my codeblock looks like:&lt;/P&gt;&lt;P&gt;def cvt(CLASS_RunS):&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if CLASS_RunS == 'E':&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out = 5&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif CLASS_RunS == 'D':&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out = 4&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out = -9&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return out&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and my expression is:&lt;/P&gt;&lt;P&gt;cvt( !RunS_score!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;('CLASS_RunS' is the name of Field 1 which contains the Ds and Es. 'RunS_score' is the name of Field 2 where the 4s and 5s are to appear) was I meant to leave this as 'field' like in your reply?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I end up with everything being -9:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="383800" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/383800_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where have I gone wrong?&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 13:30:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59276#M4710</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2017-11-16T13:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59277#M4711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ahhh you could have left my code as it was.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I assume that !RunScore! is the field containing the data and not the field you are trying to calculate, it is kindof truncated in your screen grab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 14:03:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59277#M4711</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-11-16T14:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59278#M4712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ah sorry:&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/383822_pastedImage_1.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;No, RunS_score is the field I'm trying to calculate. Have I used the wrong field in the final expression box?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 14:12:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59278#M4712</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2017-11-16T14:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59279#M4713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to the amount of Nulls in the fields (which is expected), I can't sum together my 'score' columns (I have a few) into a final 'Total' field. ie. 4 + NULL + 5 = NULL!!!! argh &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt; So I'm going to have to edit the original code provided by Jake to return 0 if D or E values aren't found.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: solution provided above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 14:33:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59279#M4713</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2017-11-16T14:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59280#M4714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;python parser? using my code and not yours?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 14:36:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59280#M4714</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-11-16T14:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59281#M4715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes using python.&lt;/P&gt;&lt;P&gt;I'll return to using your script, but with 'else: out = 0' instead of -9. (why did you choose -9? I didn't understand your initial reasoning)&lt;/P&gt;&lt;P&gt;And &lt;CODE&gt;cvt( !CLASS_RunS!) at the end instead of cvt( !RunS_score!)&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class=""&gt;def&lt;/SPAN&gt; &lt;SPAN class=""&gt;cvt&lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;field1&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;if&lt;/SPAN&gt; field1 &lt;SPAN class=""&gt;==&lt;/SPAN&gt; &lt;SPAN class=""&gt;'E'&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;5&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;elif&lt;/SPAN&gt; field1 &lt;SPAN class=""&gt;==&lt;/SPAN&gt; &lt;SPAN class=""&gt;'D'&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;4&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;else&lt;/SPAN&gt;&lt;SPAN class=""&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; out &lt;SPAN class=""&gt;=&lt;/SPAN&gt; &lt;SPAN class=""&gt;0&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;return&lt;/SPAN&gt; out


Lower box of field calculator---&amp;gt;
cvt( !CLASS_RunS!)


&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/383823_pastedImage_2.png" style="width: auto; height: auto;" /&gt;
Works perfectly. Thank you.
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:15:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59281#M4715</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2021-12-10T22:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59282#M4716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;null values are usually numbers that are unlikely to occur&lt;/P&gt;&lt;P&gt;for example, yours appear to be nominal classes ie class 1 is meaningless when comparing it to class 2, they are just different, the number doesn't mean anything.&amp;nbsp; A value of -9 or -99 or -999 or -9999 plus others go back a looooong time as null values in that sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly if your data represented counts, in otherwords 1 and 2 now have meaning, 1 means you saw one ..., 2 means you counted two and 2 means that you counted twice as many as 1.&amp;nbsp; -9 isn't possible, it doesn't mean count backwards, there is no such thing as a count of -9 ... counts are either 0 or positive OR!!! if you forgot to count something, you sure don't want to put in a 0 because that would imply you 'counted' that object and there were 0 found.&amp;nbsp; -9 means, it wasn't done&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad the Jake's worked out? or was it mine? so confusing &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 15:31:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59282#M4716</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-11-16T15:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59283#M4717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the explanation Dan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ah both your answers worked for me! Just Jake's was a bit quicker for me to understand. Don't take it personally haha&amp;nbsp; &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt; I always appreciate your help! &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 16:18:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59283#M4717</guid>
      <dc:creator>TheodoreF</dc:creator>
      <dc:date>2017-11-16T16:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: Quick field calculator IF question</title>
      <link>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59284#M4718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;none taken &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;... I think I have a few points as a buffer..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 16:22:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/quick-field-calculator-if-question/m-p/59284#M4718</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-11-16T16:22:36Z</dc:date>
    </item>
  </channel>
</rss>

