<?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 Dynamically filter and edit features — based on query to related table in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/dynamically-filter-and-edit-features-based-on/m-p/1229234#M61969</link>
    <description>&lt;P&gt;&lt;EM&gt;Oracle18c EGDB&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a feature class called EVENTS (fields: EVENT_ID, EVENT_YEAR) and a related table called FUNDING (fields: EVENT_ID, FUNDING_YEAR).&lt;/P&gt;&lt;P&gt;I want to filter (display in the attribute table) events where there are related funding rows from &lt;U&gt;&lt;EM&gt;other years&lt;/EM&gt;&lt;/U&gt;. For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Show a 2022 event that has funding from years other than 2022:&lt;UL&gt;&lt;LI&gt;Funding in 2021, 2023,&amp;nbsp;etc.&lt;/LI&gt;&lt;LI&gt;(it doesn't matter if there is funding from 2022 or not)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Don't show events that &lt;EM&gt;&lt;U&gt;only&lt;/U&gt;&lt;/EM&gt; have 2022 funding rows. And don't show rows that have no funding rows.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want the filter to be dynamic. And I want the event rows to be editable. I don't need to display any fields from the related table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What are my options?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a definition query that has an SQL subquery that points to the related table:&lt;BR /&gt;&lt;PRE&gt;event_id in (
    select
        e.event_id
    from
        events e
    left join
        funding f
        on e.event_id = f.event_id
    where
        &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;e.event_year &amp;lt;&amp;gt; f.fund_year&lt;/STRONG&gt;&lt;/FONT&gt;
        and e.event_status in ('F','P','A','C')
    group by
        e.event_id
    )  &lt;/PRE&gt;I can edit the events in the attribute table.&amp;nbsp; No joins required.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;Or, create a database view that selects the applicable funding rows. In ArcGIS Pro, create an in-map join (only matches included) to the view via the common EVENT_ID. Edit the events in the event attribute table.&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;Or, instead of an in-map join, create an in-map relate. Select all funding rows and use the Attribute Table tools to select the related event rows.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Or, do #2 above, but use a Query Layer instead of a database view.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Are there any other options or anything I've overlooked?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Jan 2023 11:16:07 GMT</pubDate>
    <dc:creator>Bud</dc:creator>
    <dc:date>2023-01-23T11:16:07Z</dc:date>
    <item>
      <title>Dynamically filter and edit features — based on query to related table</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/dynamically-filter-and-edit-features-based-on/m-p/1229234#M61969</link>
      <description>&lt;P&gt;&lt;EM&gt;Oracle18c EGDB&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a feature class called EVENTS (fields: EVENT_ID, EVENT_YEAR) and a related table called FUNDING (fields: EVENT_ID, FUNDING_YEAR).&lt;/P&gt;&lt;P&gt;I want to filter (display in the attribute table) events where there are related funding rows from &lt;U&gt;&lt;EM&gt;other years&lt;/EM&gt;&lt;/U&gt;. For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Show a 2022 event that has funding from years other than 2022:&lt;UL&gt;&lt;LI&gt;Funding in 2021, 2023,&amp;nbsp;etc.&lt;/LI&gt;&lt;LI&gt;(it doesn't matter if there is funding from 2022 or not)&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Don't show events that &lt;EM&gt;&lt;U&gt;only&lt;/U&gt;&lt;/EM&gt; have 2022 funding rows. And don't show rows that have no funding rows.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I want the filter to be dynamic. And I want the event rows to be editable. I don't need to display any fields from the related table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What are my options?&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a definition query that has an SQL subquery that points to the related table:&lt;BR /&gt;&lt;PRE&gt;event_id in (
    select
        e.event_id
    from
        events e
    left join
        funding f
        on e.event_id = f.event_id
    where
        &lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;e.event_year &amp;lt;&amp;gt; f.fund_year&lt;/STRONG&gt;&lt;/FONT&gt;
        and e.event_status in ('F','P','A','C')
    group by
        e.event_id
    )  &lt;/PRE&gt;I can edit the events in the attribute table.&amp;nbsp; No joins required.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;LI&gt;Or, create a database view that selects the applicable funding rows. In ArcGIS Pro, create an in-map join (only matches included) to the view via the common EVENT_ID. Edit the events in the event attribute table.&lt;OL class="lia-list-style-type-lower-alpha"&gt;&lt;LI&gt;Or, instead of an in-map join, create an in-map relate. Select all funding rows and use the Attribute Table tools to select the related event rows.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/LI&gt;&lt;LI&gt;Or, do #2 above, but use a Query Layer instead of a database view.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Are there any other options or anything I've overlooked?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Jan 2023 11:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/dynamically-filter-and-edit-features-based-on/m-p/1229234#M61969</guid>
      <dc:creator>Bud</dc:creator>
      <dc:date>2023-01-23T11:16:07Z</dc:date>
    </item>
  </channel>
</rss>

