<?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 Select related records and definition query in an ArcGIS Pro Python Notebook in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/select-related-records-and-definition-query-in-an/m-p/1608129#M95170</link>
    <description>&lt;P&gt;&lt;STRONG&gt;Question 1 Select related records in a Notebook&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have a many step ArcGIS Pro Python Notebook to format a layer (add fields, run calculations, make selection, populate field based on selection, clear selection, join a table, export feature…)&lt;/P&gt;&lt;P&gt;All of these are working fine in my Notebook, but one of the later steps is to add a relate from my main layer (layer1) to another layer (layer2), then make a selection on Layer1 (arcpy.management.SelectLayerByAttribute). I would like to then select related records in layer2. I can easily do this in Layer1 attribute table (Select Related Record), I can also manually for the Layer1 Selection tab under put a check in the box next to Automatically select related data. But I would rather have the select related records as another line in my Notebook. Is there an arcpy script available to select related records?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 2 Definition query on a layer in a Notebook&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have another ArcGIS Pro Python Notebook where I need to start out with a definition query on a layer, then a series of steps on that queried layer. I can easily manually create a definition query on the layer, then run the remaining steps of the Notebook. I would like to have the definition query on the layer as a step in the Notebook.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Tue, 22 Apr 2025 15:19:18 GMT</pubDate>
    <dc:creator>JohnEsch2</dc:creator>
    <dc:date>2025-04-22T15:19:18Z</dc:date>
    <item>
      <title>Select related records and definition query in an ArcGIS Pro Python Notebook</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/select-related-records-and-definition-query-in-an/m-p/1608129#M95170</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Question 1 Select related records in a Notebook&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have a many step ArcGIS Pro Python Notebook to format a layer (add fields, run calculations, make selection, populate field based on selection, clear selection, join a table, export feature…)&lt;/P&gt;&lt;P&gt;All of these are working fine in my Notebook, but one of the later steps is to add a relate from my main layer (layer1) to another layer (layer2), then make a selection on Layer1 (arcpy.management.SelectLayerByAttribute). I would like to then select related records in layer2. I can easily do this in Layer1 attribute table (Select Related Record), I can also manually for the Layer1 Selection tab under put a check in the box next to Automatically select related data. But I would rather have the select related records as another line in my Notebook. Is there an arcpy script available to select related records?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Question 2 Definition query on a layer in a Notebook&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have another ArcGIS Pro Python Notebook where I need to start out with a definition query on a layer, then a series of steps on that queried layer. I can easily manually create a definition query on the layer, then run the remaining steps of the Notebook. I would like to have the definition query on the layer as a step in the Notebook.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 15:19:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/select-related-records-and-definition-query-in-an/m-p/1608129#M95170</guid>
      <dc:creator>JohnEsch2</dc:creator>
      <dc:date>2025-04-22T15:19:18Z</dc:date>
    </item>
  </channel>
</rss>

