<?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/Then Field Calculations in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084249#M43919</link>
    <description>&lt;P&gt;Well that would be easy if NVT was all 1 ... or does it change to 2 etc.&lt;/P&gt;&lt;P&gt;Easier still if NVT were in sequential order and doesn't need to be sorted.&lt;/P&gt;&lt;P&gt;Is Hausnummer sequential as well? and equal to OBJECTID?&lt;/P&gt;&lt;P&gt;All key details, otherwise a simple counter would work&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2021 22:19:23 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2021-07-29T22:19:23Z</dc:date>
    <item>
      <title>If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1083884#M43884</link>
      <description>&lt;P&gt;Good evening,&lt;/P&gt;&lt;P&gt;I'm searching for help regarding field calculations. &lt;/P&gt;&lt;P&gt;I have a column called NVT which divides the total amount of points into groups.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The query shall divide the points having the same NVT number into groups of 32.&lt;/P&gt;&lt;P&gt;The division into subgroups of 32 is consistant. the amount of points per NVT isnt&lt;/P&gt;&lt;P&gt;For Example: NVT 1= 96 points --&amp;gt; NVT 1 shall become 3 subgroups.&amp;nbsp;&lt;/P&gt;&lt;P&gt;NVT1:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Points 1-32 get LFD3 =1&amp;nbsp;&lt;/P&gt;&lt;P&gt;Points 33-64 get LFD3 = 2&amp;nbsp;&lt;/P&gt;&lt;P&gt;Points 65-96 get LFD3 = 3&lt;/P&gt;&lt;P&gt;Same for NVT2 and NVT 3 and so on.&lt;/P&gt;&lt;P&gt;Thanks in advance &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Hopefully my explanation is okay!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Zuweisung.PNG" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19635i2FFD300ACF0639C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Zuweisung.PNG" alt="Zuweisung.PNG" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Zuweisung.PNG&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 11:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1083884#M43884</guid>
      <dc:creator>FynnScharpen</dc:creator>
      <dc:date>2021-07-29T11:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1083947#M43892</link>
      <description>&lt;P&gt;This would be simple enough, but do you have any requirements for how the calculation sorts the features into their respective categories?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 14:06:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1083947#M43892</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-07-29T14:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084020#M43902</link>
      <description>&lt;P&gt;No, that doesn't matter. Easiest would be:&lt;/P&gt;&lt;P&gt;How many Adresses has each NVT?&lt;/P&gt;&lt;P&gt;Divide the amount by 32 and give each group of 32 the same ID in LFD3. Always reach 32 until the last subgroup which can have less than 32&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 15:39:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084020#M43902</guid>
      <dc:creator>FynnScharpen</dc:creator>
      <dc:date>2021-07-29T15:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084162#M43914</link>
      <description>&lt;P&gt;is this divmod week?&lt;/P&gt;&lt;P&gt;example&lt;/P&gt;&lt;LI-CODE lang="python"&gt;a  # an array, pretend it is a field
array([  0,   8,  16,  24,  32,  40,  48,  56,  64,  72,  80,  88,  96,
       104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 200,
       208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304,
       312])

divmod(a, 32)[0]
array([0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5,
       5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9], dtype=int32)&lt;/LI-CODE&gt;&lt;P&gt;as a field calculation&lt;/P&gt;&lt;LI-CODE lang="c"&gt;divmod(!your_field!, 32)[0]&lt;/LI-CODE&gt;&lt;P&gt;or replace 32 with whatever divisor you want.&amp;nbsp; If you want the remainder, replace [0] with [1]&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 19:24:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084162#M43914</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-29T19:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084226#M43918</link>
      <description>&lt;P&gt;Tahnks for trying to help Dan! I know what you mean but that doesn't fit my purpose. In my case the array/field is different. For example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,....])&lt;/P&gt;&lt;P&gt;so for the first 32&amp;nbsp; times&amp;nbsp; 1 in the array it shall return 1 in a new column for each one. for the next 32 times 1 it shall return 2.&lt;/P&gt;&lt;P&gt;So if the array has 90 times a 1 it shall return in a new column for the first 32: "1" for the next 32:&amp;nbsp; "2" and for the remaining 26: "3"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have an idea let me know. I definetly have to improve in this area &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards Fynn&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 21:21:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084226#M43918</guid>
      <dc:creator>FynnScharpen</dc:creator>
      <dc:date>2021-07-29T21:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084249#M43919</link>
      <description>&lt;P&gt;Well that would be easy if NVT was all 1 ... or does it change to 2 etc.&lt;/P&gt;&lt;P&gt;Easier still if NVT were in sequential order and doesn't need to be sorted.&lt;/P&gt;&lt;P&gt;Is Hausnummer sequential as well? and equal to OBJECTID?&lt;/P&gt;&lt;P&gt;All key details, otherwise a simple counter would work&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 22:19:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084249#M43919</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-29T22:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084264#M43920</link>
      <description>&lt;P&gt;Thats the problem. NVT can have numbers between 1 and 100, has to be sorted and its frequency of each varies. Hausnummer is only sequential in this test case normally it isn't.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure if you understood my problem. My technical English needs to improve.&lt;/P&gt;&lt;P&gt;1. Step: Sorting all addresses based on NVT&lt;/P&gt;&lt;P&gt;2. Step: Count the number of addresses that have the same NVT number.&lt;/P&gt;&lt;P&gt;3. Step: The first 32 addresses with the same NVT number get a 1 in LF3D if there are more than 32 the next 32 get the 2 in LF3D and so on.&lt;/P&gt;&lt;P&gt;4. Step: Repeating step 3 for the next NVT number&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 22:39:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084264#M43920</guid>
      <dc:creator>FynnScharpen</dc:creator>
      <dc:date>2021-07-29T22:39:17Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084324#M43924</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;&lt;P&gt;Left table... Vals_ range from 1 to 3 inclusive.&lt;/P&gt;&lt;P&gt;Purpose : sort, group and reclass the Vals_ data into groups of 12, sequencing each group from 1 onward.&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp; there are&amp;nbsp; 1: 38, 2: 31, 3: 31]&lt;/P&gt;&lt;P&gt;Groups are split at&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1: [ 12, 24, 36])&lt;/P&gt;&lt;P&gt;2: [ 12, 24])&lt;/P&gt;&lt;P&gt;3: [ 12, 24])]&lt;/P&gt;&lt;P&gt;and resequenced.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="input_output.png" style="width: 474px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/19740i89D8E7CC43864824/image-size/large?v=v2&amp;amp;px=999" role="button" title="input_output.png" alt="input_output.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;input_output.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I have attached an Excel version of the table for you to look at&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 03:13:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084324#M43924</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-30T03:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084331#M43926</link>
      <description>&lt;P&gt;Yes, thats it! Now I'm even more curious how you did that. The "new_key" is exactly what I tried to achieve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance, Fynn&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 04:36:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084331#M43926</guid>
      <dc:creator>FynnScharpen</dc:creator>
      <dc:date>2021-07-30T04:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084358#M43931</link>
      <description>&lt;P&gt;read my blog&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/python-blog/bg-p/python-blog" target="_blank" rel="noopener"&gt;Group, split and reclass using numpy, python and arcpy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;off to the garden.... back in 8 hours &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 09:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084358#M43931</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-07-30T09:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: If/Then Field Calculations</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084368#M43933</link>
      <description>&lt;P&gt;Thank you so much! There is so much I can learn.&lt;/P&gt;&lt;P&gt;Enjoy your garden time and have a joyful weekend. Off to new challenge&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards, Fynn&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jul 2021 11:41:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/if-then-field-calculations/m-p/1084368#M43933</guid>
      <dc:creator>FynnScharpen</dc:creator>
      <dc:date>2021-07-30T11:41:05Z</dc:date>
    </item>
  </channel>
</rss>

