<?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 How to query all rows from a joined table? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792008#M1593</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We tried to query all rows from a feature layer having a joined table and obtain all row values. When we are using the IDisplayTable::GetFieldDescription&amp;nbsp;method all fields (also the joined fields) are returned, but when we are iterating through the RowCursor returned by IDisplayTable::Search only the values of the "origin table" are returned any access using a field index targetting a field from the joined table by Row::GetValue(fieldIndex) leads to a null reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a known issue or do we need to downcast from FeatureLayer/StandaloneTable, or just access the row values using a different approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Aug 2020 16:29:27 GMT</pubDate>
    <dc:creator>Jan-Tschada</dc:creator>
    <dc:date>2020-08-13T16:29:27Z</dc:date>
    <item>
      <title>How to query all rows from a joined table?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792008#M1593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We tried to query all rows from a feature layer having a joined table and obtain all row values. When we are using the IDisplayTable::GetFieldDescription&amp;nbsp;method all fields (also the joined fields) are returned, but when we are iterating through the RowCursor returned by IDisplayTable::Search only the values of the "origin table" are returned any access using a field index targetting a field from the joined table by Row::GetValue(fieldIndex) leads to a null reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a known issue or do we need to downcast from FeatureLayer/StandaloneTable, or just access the row values using a different approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Aug 2020 16:29:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792008#M1593</guid>
      <dc:creator>Jan-Tschada</dc:creator>
      <dc:date>2020-08-13T16:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to query all rows from a joined table?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792009#M1594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any ArcGIS Pro SDK Join expert out there? &lt;A href="https://community.esri.com/migrated-users/44320"&gt;Rich Ruh&lt;/A&gt;‌&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2020 07:26:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792009#M1594</guid>
      <dc:creator>Jan-Tschada</dc:creator>
      <dc:date>2020-08-24T07:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to query all rows from a joined table?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792010#M1595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not that familiar with the layer-level query routines that you're using. &amp;nbsp;Have you tried just calling FeatureLayer.GetFeatureClass() and querying against that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2020 15:06:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792010#M1595</guid>
      <dc:creator>RichRuh</dc:creator>
      <dc:date>2020-08-24T15:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to query all rows from a joined table?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792011#M1596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I just tried this using release 2.6 and it is working for me.&amp;nbsp; In my test I have a feature layer that is joined to a table (both the feature layer and the table are in the TOC).&amp;nbsp; I retrieve the feature layer for the query from the map using:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; MapView&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Active&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;OfType&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;FeatureLayer&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Where &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;l &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; l&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Equals &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In my&amp;nbsp;sample&amp;nbsp;I only query the selected features, however, I see all values including the values of the joined table:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;QueryFilter qf &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;QueryFilter&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    ObjectIDs &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetSelection&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetObjectIDs&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; rowCursor &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Search&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;qf&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;while&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;rowCursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;MoveNext&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;using&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; anyRow &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; rowCursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Current&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;foreach&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fld &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; anyRow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetFields&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Where&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fld &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; fld&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FieldType &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; FieldType&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="comment token"&gt;// includes all 'joined' field names&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fieldName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; fld&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;// fld.AliasName&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;foreach&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fld &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; anyRow&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetFields&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Where&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fld &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; fld&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FieldType &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; FieldType&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                &lt;SPAN class="comment token"&gt;// get all field values&lt;/SPAN&gt;
                &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; fieldValue &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;anyRow&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;fld&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;?&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Empty &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; anyRow&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;fld&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Name&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;ToString&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:05:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792011#M1596</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2021-12-12T09:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to query all rows from a joined table?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792012#M1597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Finally we solved the issue. We implemented a kind of wrapper before accessing the underlying RowCursor and this custom implementation did not handled the GetTableDefinition exception correctly when the layer or standalone table is having a join. Sometimes it is really helpful by just letting someone know which&amp;nbsp;things are not&amp;nbsp;related to the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for narrowing this down.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2020 11:02:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/792012#M1597</guid>
      <dc:creator>OSINT_ENGINEER</dc:creator>
      <dc:date>2020-08-27T11:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to query all rows from a joined table?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/1094460#M7093</link>
      <description>&lt;P&gt;Hi Wolf,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would your query sample above also work for querying geodatabase tables? If not, how would you modify it? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 15:56:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/how-to-query-all-rows-from-a-joined-table/m-p/1094460#M7093</guid>
      <dc:creator>ThiPham12</dc:creator>
      <dc:date>2021-09-01T15:56:36Z</dc:date>
    </item>
  </channel>
</rss>

