<?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: ArcGIS Pro 1.4 Field calculator  in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130783#M7534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this python expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;!fieldname![0]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Apr 2017 06:41:37 GMT</pubDate>
    <dc:creator>JayantaPoddar</dc:creator>
    <dc:date>2017-04-10T06:41:37Z</dc:date>
    <item>
      <title>ArcGIS Pro 1.4 Field calculator</title>
      <link>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130782#M7533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how do i extract the first character from another field, In desktop i would of used the Left([Field1],1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 03:45:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130782#M7533</guid>
      <dc:creator>MatthewIrwin</dc:creator>
      <dc:date>2017-04-10T03:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 1.4 Field calculator</title>
      <link>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130783#M7534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use this python expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;!fieldname![0]&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 06:41:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130783#M7534</guid>
      <dc:creator>JayantaPoddar</dc:creator>
      <dc:date>2017-04-10T06:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 1.4 Field calculator</title>
      <link>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130784#M7535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But if there is the remotest change that you will have nulls in your table, then you have to go with a bit more pythonic magic which basically does a true/false test.&amp;nbsp; if the field called 'afield' is None (aka Null) then you take the slice to the right of the selection options.&amp;nbsp; If it contains text, then you take the slice to the left, which is the false part.&lt;/P&gt;&lt;P&gt;So in short the syntax is [ false section, true section][query]&amp;nbsp;&amp;nbsp; or [0, 1][query] [False, True][query] useful functionality avoiding code blocks for simple yes/no questions&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;!afield!&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; None&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;!afield! &lt;SPAN class="keyword token"&gt;is&lt;/SPAN&gt; None&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 06:56:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130784#M7535</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-04-10T06:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro 1.4 Field calculator</title>
      <link>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130785#M7536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also handle the None/NULL issue using a Python conditional expression, which avoids the need for a code block with simple expressions and follows a classic ternary operator pattern:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;None &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; None &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; !Field1!&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Apr 2017 13:42:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcgis-pro-1-4-field-calculator/m-p/130785#M7536</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-04-10T13:42:32Z</dc:date>
    </item>
  </channel>
</rss>

