<?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: Merge table records based on unique field, but overwrite with specific attributes in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/merge-table-records-based-on-unique-field-but/m-p/586077#M33088</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jake, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great, this will work.&amp;nbsp; I went through manually to check and am going to write it into a script next.&amp;nbsp; Thanks for the suggestions!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 May 2017 17:17:15 GMT</pubDate>
    <dc:creator>MollyMoore</dc:creator>
    <dc:date>2017-05-01T17:17:15Z</dc:date>
    <item>
      <title>Merge table records based on unique field, but overwrite with specific attributes</title>
      <link>https://community.esri.com/t5/data-management-questions/merge-table-records-based-on-unique-field-but/m-p/586075#M33086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a table of records that includes categorical probabilities (Low, Medium, High) for species within 'zones' as represented by a unique id. See below for example:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/349141_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The table has a one to many relationship for zones to probability if there is more than one probability of a species within a zone (i.e. a zone could be marked with L and M, in which case there would be two records for the zone).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to flatten the zones based on the unique id and overwrite the probability with the largest probability (so, H would always overwrite M or L, and M would always overwrite L, and L would always overwrite blanks), so the table above would end up looking like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/349151_Capture1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using ArcMap 10.4 and am also using Arcpy for some processing.&amp;nbsp; I don't think this can be done using merge because there is not an option to overwrite based on specific attributes. I imagine this may be able to be done with arcpy using cursors, but I have no idea where to start with cursors for this specific outcome. Can someone point me in the right direction with this or let me know if there is a better method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 May 2017 15:46:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/merge-table-records-based-on-unique-field-but/m-p/586075#M33086</guid>
      <dc:creator>MollyMoore</dc:creator>
      <dc:date>2017-05-01T15:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: Merge table records based on unique field, but overwrite with specific attributes</title>
      <link>https://community.esri.com/t5/data-management-questions/merge-table-records-based-on-unique-field-but/m-p/586076#M33087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Molly,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is one way you could do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; Use the Field Calculator to convert the L, M, H values to integer.&amp;nbsp; That will allow you to run the 'Summary Statistics' tool and return only the 'MAX' value for that unique id.&amp;nbsp; Here is an example that you would run on each field changing !SGCN1! to !SGCN2! and to !SGCN2! for the second dialog.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/349155_Screen1.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; Run the Summary Statistics tool specifying the 'MAX' for each field and unique_id for the Case Field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/349157_Screen2.PNG" style="width: 620px; height: 405px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; You can then convert the integers back to text using the Field Calculator:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-3 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/349158_Screen3.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 May 2017 16:24:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/merge-table-records-based-on-unique-field-but/m-p/586076#M33087</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2017-05-01T16:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Merge table records based on unique field, but overwrite with specific attributes</title>
      <link>https://community.esri.com/t5/data-management-questions/merge-table-records-based-on-unique-field-but/m-p/586077#M33088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jake, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great, this will work.&amp;nbsp; I went through manually to check and am going to write it into a script next.&amp;nbsp; Thanks for the suggestions!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 May 2017 17:17:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/merge-table-records-based-on-unique-field-but/m-p/586077#M33088</guid>
      <dc:creator>MollyMoore</dc:creator>
      <dc:date>2017-05-01T17:17:15Z</dc:date>
    </item>
  </channel>
</rss>

