<?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 Limiting outFields on Attribute Table Related Query in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/limiting-outfields-on-attribute-table-related/m-p/782527#M2808</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're attempting to limit the number of fields that are returned by a relationship query and are being displayed in the Attribute Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've looked in _RelationshipTable.js, specifically lines 197-201 and have modified these but the entire schema still is coming through.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var relatedQuery = new RelationshipQuery();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.objectIds = selectedIds;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.outFields = ofs.length ? ofs : ["FIELD1", "FIELD2"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.relationshipId = ship.id;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.returnGeometry = false;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, I receive an error in the console when I click on 'show related records' in a popup and fire the query (see attached).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:54:19 GMT</pubDate>
    <dc:creator>SethLewis1</dc:creator>
    <dc:date>2021-12-12T08:54:19Z</dc:date>
    <item>
      <title>Limiting outFields on Attribute Table Related Query</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/limiting-outfields-on-attribute-table-related/m-p/782527#M2808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We're attempting to limit the number of fields that are returned by a relationship query and are being displayed in the Attribute Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've looked in _RelationshipTable.js, specifically lines 197-201 and have modified these but the entire schema still is coming through.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var relatedQuery = new RelationshipQuery();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.objectIds = selectedIds;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.outFields = ofs.length ? ofs : ["FIELD1", "FIELD2"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.relationshipId = ship.id;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.returnGeometry = false;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In addition, I receive an error in the console when I click on 'show related records' in a popup and fire the query (see attached).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:54:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/limiting-outfields-on-attribute-table-related/m-p/782527#M2808</guid>
      <dc:creator>SethLewis1</dc:creator>
      <dc:date>2021-12-12T08:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Limiting outFields on Attribute Table Related Query</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/limiting-outfields-on-attribute-table-related/m-p/782528#M2809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Seth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I see that error all the time from the AT widget (some I would not be concerned with it).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ofs.length is normally going to be defined so you will not make it to your ["FIELD1", "FIELD2"] portion of code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would look at something more like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(relatedTableInfo.name === "x"){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; relatedQuery.outFields = ["FIELD1", "FIELD2"];&lt;/P&gt;&lt;P&gt;}else{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; relatedQuery.outFields = ofs.length ? ofs : ["*"];&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 May 2016 16:06:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/limiting-outfields-on-attribute-table-related/m-p/782528#M2809</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-05-26T16:06:14Z</dc:date>
    </item>
  </channel>
</rss>

