<?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: Creating a script to Calculate Field Python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165841#M54203</link>
    <description>&lt;P&gt;&lt;SPAN&gt;"in"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(Inspector=="Alan Covington" or "Braxton Lawrence" or "Dave Besler"):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(Inspector in ["Alan Covington", "Braxton Lawrence", "Dave Besler"]:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;peeps = ["Alan Covington", "Braxton Lawrence", "Dave Besler"]

Inspector = "Dave Besler"

Inspector in peeps

True&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 19 Apr 2022 19:39:24 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-04-19T19:39:24Z</dc:date>
    <item>
      <title>Creating a script to Calculate Field Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165835#M54201</link>
      <description>&lt;P&gt;I am trying to calculate a field based on whether another field is filled or null using python. I'm open to Arcade or SQL too. What I want to do is "If the Inspector field is filled, then calculate the Completed field as 'Flushed'. If the Inspector field is &amp;lt;Null&amp;gt;, then calculate the Completed field as 'Not Flushed'." Here is my code so far. The issue is that it is calculating everything as 'Flushed'.&lt;/P&gt;&lt;P&gt;def reclass(Inspector):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Inspector=="Alan Covington" or "Braxton Lawrence" or "Dave Besler"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Flushed"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Not Flushed"&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 19:28:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165835#M54201</guid>
      <dc:creator>RachaelMurtaugh</dc:creator>
      <dc:date>2022-04-19T19:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a script to Calculate Field Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165841#M54203</link>
      <description>&lt;P&gt;&lt;SPAN&gt;"in"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(Inspector=="Alan Covington" or "Braxton Lawrence" or "Dave Besler"):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(Inspector in ["Alan Covington", "Braxton Lawrence", "Dave Besler"]:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;peeps = ["Alan Covington", "Braxton Lawrence", "Dave Besler"]

Inspector = "Dave Besler"

Inspector in peeps

True&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 19 Apr 2022 19:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165841#M54203</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-04-19T19:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a script to Calculate Field Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165851#M54206</link>
      <description>&lt;P&gt;#Another option:&amp;nbsp;&amp;nbsp;This does work&lt;/P&gt;&lt;P&gt;def reclass(Inspector):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Inspector == "Alan Covington" or Inspector =="Braxton Lawrence" or Inspector == "Dave Besler"):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Flushed"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Not Flushed"&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 19:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165851#M54206</guid>
      <dc:creator>Reinaldo_Cartagena</dc:creator>
      <dc:date>2022-04-19T19:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a script to Calculate Field Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165863#M54208</link>
      <description>&lt;P&gt;This worked. Oddly, the data was reading the field slightly differently when it came to the inspectors' names, and your addition helped. Thank you&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;def reclass(Inspector):&lt;BR /&gt;if(Inspector=="Besler" or Inspector=="Covington" or Inspector=="Lawrence B"):&lt;BR /&gt;return "Flushed"&lt;BR /&gt;else:&lt;BR /&gt;return "Not Flushed"&lt;/P&gt;</description>
      <pubDate>Tue, 19 Apr 2022 20:12:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/creating-a-script-to-calculate-field-python/m-p/1165863#M54208</guid>
      <dc:creator>RachaelMurtaugh</dc:creator>
      <dc:date>2022-04-19T20:12:30Z</dc:date>
    </item>
  </channel>
</rss>

