<?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: Python and related tables in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314875#M24479</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dan, thanks for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes there is something larger.&amp;nbsp; We have an ongoing project where new vegetation data is collected on about 120 transects at regular intervals.&amp;nbsp; The end results will be statistical calculations such as Jaccard index, percent similarity, and others.&amp;nbsp; These will be calculated in so many combinations (over 3000 in one case) that a manual process would be too time consuming.&amp;nbsp; Also, my goal is to enable others that have an understanding of these statistics, but lack the software knowledge to run their own calculations, to be able to use a script to be self-sufficient.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that gives a better understanding of my goal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wes&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Jun 2014 19:56:00 GMT</pubDate>
    <dc:creator>WesKing</dc:creator>
    <dc:date>2014-06-28T19:56:00Z</dc:date>
    <item>
      <title>Python and related tables</title>
      <link>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314873#M24477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm relatively new using Python and I can't seem to find any good information on what I'm attempting to do.&amp;nbsp; Thanks in advance if you have any tips.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set up: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have 3 tables; A (spatial) B (non-spatial) and C (non-spatial).&amp;nbsp; A is related to B and B is related to C.&amp;nbsp; All are in a file geodatabase and relationship classes have been built.&amp;nbsp; I would like to select features from A and traverse through B and ultimately work with the data in C.&amp;nbsp; In ArcMap I would select features in A, open related table B, then open related table C...and do what I need to do.&amp;nbsp; I would smile, pat myself on the back and go to sleep feeling satisfied &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; But I want to do this using Python and can't seem to figure out how, other than creating a list using a search cursor to store the unique values in A then using that list and another search cursor on B to create another list, and then do the same on C.&amp;nbsp; It seems there must be a more efficient way to do this in Python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wes&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jun 2014 17:13:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314873#M24477</guid>
      <dc:creator>WesKing</dc:creator>
      <dc:date>2014-06-28T17:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Python and related tables</title>
      <link>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314874#M24478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It seems that your described workflow is working.&amp;nbsp; Why do you feel the need to code it?&amp;nbsp; Is it part of something larger?&amp;nbsp; There is little/no way to "select" a feature using python other than via a query.&amp;nbsp; Could you describe your end purpose in more detail&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jun 2014 18:36:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314874#M24478</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-06-28T18:36:59Z</dc:date>
    </item>
    <item>
      <title>Re: Python and related tables</title>
      <link>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314875#M24479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dan, thanks for the response.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes there is something larger.&amp;nbsp; We have an ongoing project where new vegetation data is collected on about 120 transects at regular intervals.&amp;nbsp; The end results will be statistical calculations such as Jaccard index, percent similarity, and others.&amp;nbsp; These will be calculated in so many combinations (over 3000 in one case) that a manual process would be too time consuming.&amp;nbsp; Also, my goal is to enable others that have an understanding of these statistics, but lack the software knowledge to run their own calculations, to be able to use a script to be self-sufficient.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that gives a better understanding of my goal.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wes&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Jun 2014 19:56:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314875#M24479</guid>
      <dc:creator>WesKing</dc:creator>
      <dc:date>2014-06-28T19:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Python and related tables</title>
      <link>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314876#M24480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Would this "auto-relate" take place via the ArcMap (like you would want a button or script tool to select the records in table C, per your selected features in Feature class A), or in a stand alone script?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Either way, this is very doable in Python using some search cursors... It might look something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc = r"C:\temp\test.gdb\my_fc"
fieldValueListA = [r[0] for r in arcpy.da.SearchCursor(fc, ["FIELD_A"])]
tblB = r"C:\temp\test.gdb\tbl_b"
fieldValueListB = [r[0] for r in arcpy.da.SearchCursor(tblB, ["FIELD_B"], "FIELD_A in (" + str(fieldValueListA)[1:-1] + ")")]
#....and so on&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:59:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/python-and-related-tables/m-p/314876#M24480</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T14:59:32Z</dc:date>
    </item>
  </channel>
</rss>

