<?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: How can I include featureClass names with join field names using ModelBuilder ? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1136186#M50396</link>
    <description>&lt;P&gt;closed?&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jan 2022 05:25:44 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2022-01-23T05:25:44Z</dc:date>
    <item>
      <title>How can I include featureClass names with join field names using ModelBuilder ?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1127485#M49182</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I try to make a join of the fields using the iterator for multiple FeaturesClasses that have the same fields. So, I should differentiate them by their &lt;FONT color="#000000"&gt;FeaturesClasses&amp;nbsp;&lt;/FONT&gt;names.&amp;nbsp;like this :&amp;nbsp; &lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;NameFeaturesClasses&lt;/FONT&gt;&lt;FONT color="#008000"&gt;_NamefildJoin , &lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT color="#008000"&gt;&lt;FONT color="#000000"&gt;for example&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&amp;nbsp;&lt;FONT color="#0000FF"&gt;BATI_CAout&lt;/FONT&gt;&lt;FONT color="#008000"&gt;_QCooling.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;How can I include featureClasses names with join field names using ModelBuilder ?&lt;/P&gt;&lt;P&gt;thank you for your collaboration.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="khalidechlouchi_0-1639953774136.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/30010i1928B94A4C1AAD03/image-size/medium?v=v2&amp;amp;px=400" role="button" title="khalidechlouchi_0-1639953774136.png" alt="khalidechlouchi_0-1639953774136.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Dec 2021 22:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1127485#M49182</guid>
      <dc:creator>khalidechlouchi</dc:creator>
      <dc:date>2021-12-19T22:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include featureClass names with join field names using ModelBuilder ?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1127489#M49184</link>
      <description>&lt;P&gt;related&amp;nbsp;&lt;STRONG&gt;&lt;A href="https://community.esri.com/t5/python-questions/how-to-add-the-name-of-featureclasses-to-the-names/m-p/1127426#M63266" target="_blank"&gt;how to add the name of FeatureClasses to the names... - Esri Community&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Add Join and Join field are your two conventional options.&lt;/P&gt;&lt;P&gt;A third alternative is to build arrays with the desired data using TableToNumPyArray.&lt;/P&gt;&lt;P&gt;Assemble the arrays in NumPy and use ExtendTable once with the resultant or use it multiple times to permanently join to a featureclass table.&lt;/P&gt;&lt;P&gt;You can change the field names in numpy&lt;/P&gt;&lt;LI-CODE lang="python"&gt;a = TableToNumPyArray(in_fc, "*", skip_nulls=True)
flds = a.dtype.names
new_flds = [f"Bati_{i}" for i in flds]
new_flds
 
['Bati_OBJECTID',
 'Bati_Shape',
 'Bati_ids',
 'Bati_CENTROID_X',
 'Bati_CENTROID_Y',
 'Bati_INSIDE_X',
 'Bati_INSIDE_Y',
 'Bati_PART_COUNT',
 'Bati_PNT_COUNT',
 'Bati_Sort_',
 'Bati_Shape_Length',
 'Bati_Shape_Area']
# ---
# -- magic time
from arcpy.da import ExtendTable
a.dtype.names = new_flds
sub_arr = a[['Bati_OBJECTID', 'Bati_PART_COUNT']]
ExtendTable(in_fc, "OBJECTID", sub_arr, 'Bati_OBJECTID')&lt;/LI-CODE&gt;&lt;P&gt;Magic done&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="extend_table.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/30012i142ECCDADE5869CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="extend_table.png" alt="extend_table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;of course you would want a preselected list of fields to produce/slice fields from the main array to make sub_arr.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Dec 2021 23:27:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1127489#M49184</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2021-12-19T23:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include featureClass names with join field names using ModelBuilder ?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1127794#M49232</link>
      <description>&lt;P&gt;Thank you for your help, I will try this approach.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Dec 2021 21:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1127794#M49232</guid>
      <dc:creator>khalidechlouchi</dc:creator>
      <dc:date>2021-12-20T21:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I include featureClass names with join field names using ModelBuilder ?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1136186#M50396</link>
      <description>&lt;P&gt;closed?&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jan 2022 05:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-can-i-include-featureclass-names-with-join/m-p/1136186#M50396</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-01-23T05:25:44Z</dc:date>
    </item>
  </channel>
</rss>

