<?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: ArcMap 10.4 Field Calculator Manhole Invert Lelels in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518503#M29406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, it did the job! I might need to automate this process with some code if I start getting more data.&lt;BR /&gt;&lt;BR /&gt;if anyone can assist with that, it would be great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Apr 2017 23:46:12 GMT</pubDate>
    <dc:creator>MaksymKhovalko</dc:creator>
    <dc:date>2017-04-25T23:46:12Z</dc:date>
    <item>
      <title>ArcMap 10.4 Field Calculator Manhole Invert Lelels</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518501#M29404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one should be an easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table from Collector&amp;nbsp;with recorded manhole Invert depths.&lt;/P&gt;&lt;P&gt;When I perform simple subtraction [LID_LEVEL] - [INV1_DEPTH] I get Invert Levels replicating Lid Levels if Invert Depth is zero. I want to return zero value in those cases.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 23:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518501#M29404</guid>
      <dc:creator>MaksymKhovalko</dc:creator>
      <dc:date>2017-04-25T23:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap 10.4 Field Calculator Manhole Invert Lelels</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518502#M29405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The easiest way to fix this (after the fact) is to take advantage of the fact that the Calculate Field tool only operates on selected records. Open the attribute table, select for all records where your invert depth is zero, and calculate your results field to zero.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also get fancier with Calculate Field with a code block (see the help), but it is easier to use selections.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 23:32:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518502#M29405</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2017-04-25T23:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap 10.4 Field Calculator Manhole Invert Lelels</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518503#M29406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks, it did the job! I might need to automate this process with some code if I start getting more data.&lt;BR /&gt;&lt;BR /&gt;if anyone can assist with that, it would be great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2017 23:46:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518503#M29406</guid>
      <dc:creator>MaksymKhovalko</dc:creator>
      <dc:date>2017-04-25T23:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap 10.4 Field Calculator Manhole Invert Lelels</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518504#M29407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can still use the field calculator if you just have one condition to test.&lt;/P&gt;&lt;P&gt;I have substituted your field names with 'a' and 'b' in the example, then wrapped it up with them&lt;/P&gt;&lt;P&gt;I am sure you can follow along.&amp;nbsp; The condition is on the right, the False, True slice is on the left&lt;/P&gt;&lt;P&gt;... [do this if False, do this if True][condition to check] .... is the syntax&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;
b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;11&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;a &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; b&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;a &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; b &lt;SPAN class="operator token"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# returns zero&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# try a positive&lt;/SPAN&gt;
a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;10&lt;/SPAN&gt;
b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;9&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;a &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; b&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;a&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;b &lt;SPAN class="operator token"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN class="comment token"&gt;# returns the difference&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# now it looks horrible with your field names, but so what&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# NOTE&amp;nbsp; use the Python parser... field names enclosed in !'s&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;#&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;!LID_LEVEL! &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; !INV1_DEPTH!&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;!LID_LEVEL! &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; !INV1_DEPTH! &lt;SPAN class="operator token"&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0.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;/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;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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:37:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518504#M29407</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T22:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap 10.4 Field Calculator Manhole Invert Lelels</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518505#M29408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Oh I get it. You are casting boolean expressions to integer in the context of a slice index, where True and False will cast to 1 and 0.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; a &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; b &lt;SPAN class="operator token"&gt;&amp;gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; int&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;a &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; b &lt;SPAN class="operator token"&gt;&amp;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="number token"&gt;0&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;/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;&lt;/P&gt;&lt;P&gt;I guess I'd rather create the code block. &lt;A href="https://www.python.org/dev/peps/pep-0020/" rel="nofollow noopener noreferrer" target="_blank"&gt;Readability counts.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculate FIeld Expression&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;f&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!LID_LEVEL! &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; !INV1_DEPTH!&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;Calculate Field Code block ("pre-logic script code")&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;f&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lev&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; dep&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; lev &lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; dep&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; val &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; lev &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; dep
&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; val &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; val&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;/CODE&gt;&lt;/PRE&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:37:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518505#M29408</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2021-12-11T22:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcMap 10.4 Field Calculator Manhole Invert Lelels</title>
      <link>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518506#M29409</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is simple like a two case condition check for the field calculator, I like the direct solution.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With a code block you can make a mistake with the expression or the code block. like&lt;/P&gt;&lt;P&gt;f(&lt;CODE&gt;!LID_LEVEL! &lt;SPAN&gt;-&lt;/SPAN&gt; !INV1_DEPTH!&lt;SPAN&gt;) should be&amp;nbsp;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;f(&lt;CODE&gt;!LID_LEVEL!, !INV1_DEPTH!&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 04:07:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/arcmap-10-4-field-calculator-manhole-invert-lelels/m-p/518506#M29409</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-04-26T04:07:44Z</dc:date>
    </item>
  </channel>
</rss>

