<?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: Query Widget does not show results for Feature joined with view in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-does-not-show-results-for-feature/m-p/250625#M6788</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there - fairly old thread but I found myself in this situation this week. I'm using the widget from my Portal so I am unable to adjust the code unless I put the web app on my own IIS server. Which I woudl like to do, just not on the short list right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to get additional attributes from a different SQL db table to a point feature that has a related (relationship class exists within gdb)table in the same gdb as the point feature.&amp;nbsp; As soon as I publish a service with this join in place, the widget fails in the way you have explained.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions is whether or not you ever found another solution and if you think there is any work around within if I'm using this widget from a Portal hosted web app? Mayeb I need to run a process to move teh attributes from teh joined table directly to the related table or point feature itself? IDK, struggling to identify the problem so I can craft my approach.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2019 19:12:08 GMT</pubDate>
    <dc:creator>BugPie</dc:creator>
    <dc:date>2019-05-22T19:12:08Z</dc:date>
    <item>
      <title>Query Widget does not show results for Feature joined with view</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-does-not-show-results-for-feature/m-p/250623#M6786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For comparison sake I created two similar features in the MXD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first named, named Electric Service Point consists of the Feature (ServicePointBank) joined with a table (ServicePoint) further joined with a view that get's its data across a db link to another database.&lt;/P&gt;&lt;P&gt;The second, named Electric Service Point Query consists of the Feature (ServicePointBank) joined with the table (ServicePoint).&lt;/P&gt;&lt;P&gt;In short, the only difference between the two is that the first Feature has the view joined with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These are published to a service, which is consumed by a web map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am then using Web AppBuilder Developer Edition (version 1.3) and am using the web map.&amp;nbsp; I configured the Query Widget identically for both Features.&amp;nbsp; They are configured to query against a field on the ServicePoint table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Results:&lt;/P&gt;&lt;P&gt;For the first feature, it displays "Number of features found: 1) in the query results but does NOT list the feature or show the graphic on the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second feature, it displays the same but ALSO lists the feature and shows the graphic on the map.&amp;nbsp; The problems that I really need the data from that view and I do NOT want to have two layers in the layer list as it confuses our users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking in the Firefox debugger is see that both features call:&lt;/P&gt;&lt;P&gt;First Feature:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/1/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript17._jsonpCallback" title="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/1/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript17._jsonpCallback"&gt;https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/1/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/1/query?f=json&amp;amp;where=&amp;amp;returnGeometry=true&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;objectIds=92303&amp;amp;outFields=SDEADMIN.ServicePointBank.OBJECTID&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript18._jsonpCallback" title="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/1/query?f=json&amp;amp;where=&amp;amp;returnGeometry=true&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;objectIds=92303&amp;amp;outFields=SDEADMIN.ServicePointBank.OBJECTID&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript18._jsonpCallback"&gt;https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/1/query?f=json&amp;amp;where=&amp;amp;returnGeometry=tru…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Second Feature:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript11._jsonpCallback" title="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript11._jsonpCallback"&gt;https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript11._jsonpCallback" title="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript11._jsonpCallback"&gt;https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the second feature is the only one that even tries to call:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript11._jsonpCallback" title="https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=SDEADMIN.ServicePoint.SPID%20%3D%20%278190369399%27&amp;amp;returnGeometry=false&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;outSR=102100&amp;amp;callback=dojo.io.script.jsonp_dojoIoScript11._jsonpCallback"&gt;https://gisdev.avistacorp.com/arcgis/rest/services/DEV/MattsQueryTest/MapServer/5/query?f=json&amp;amp;returnIdsOnly=true&amp;amp;where=…&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't really notice much of a difference debugging through the Widget code but I am not familiar with it or with java script in general so there is a good chance I missed something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anybody seen (and hopefully found a way around) this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jan 2016 22:48:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-does-not-show-results-for-feature/m-p/250623#M6786</guid>
      <dc:creator>MatthewTownsend</dc:creator>
      <dc:date>2016-01-28T22:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Query Widget does not show results for Feature joined with view</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-does-not-show-results-for-feature/m-p/250624#M6787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After talking with ESRI support we modified the Query Widget Javascript slightly to get it working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that if it has a joined view it returns an empty feature list for the results of an object ID query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I modified it to always do the backup query using the objectID field name (in my case SDEADMIN.ServicePointBank.ObjectID).&amp;nbsp; The issue in this case was that the feature with the view joined to it was NOT getting an error.&amp;nbsp; Instead it was returning "successfully" with a count of 1 but an empty feature collection.&amp;nbsp; The downside to the change below is that for multiple results you will more quickly run into the max URI length.&amp;nbsp; Seems to me that the best option would be to just get the feature result from the original query (in my case SPID = 'some number') rather than getting the object IDs from that query and then querying again using the object IDs as the Widget is currently setup to do.&amp;nbsp; For now, this change will do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Old code from Query/SingleTask.js:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_queryByObjectIds: function(objectIds, returnGeometry){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var def = new Deferred();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryParams = new EsriQuery();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.returnGeometry = !!returnGeometry;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.outSpatialReference = this.map.spatialReference;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.outFields = this._getOutputFields();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.objectIds = objectIds;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask = new QueryTask(this.currentAttrs.config.url);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(queryParams).then(lang.hitch(this, function(response){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def.resolve(response);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }), lang.hitch(this, function(err){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(err.code === 400){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //the query fails maybe becasuse the layer is a joined layer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //joined layer:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fcsc-wade7d%3A6080%2Farcgis%2Frest%2Fservices%2FCases%2FParcelWithJoin%2FMapServer%2F0" rel="nofollow" target="_blank"&gt;http://csc-wade7d:6080/arcgis/rest/services/Cases/ParcelWithJoin/MapServer/0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //joined layer doesn't support query by objectIds direcly, so if the layer is joined,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //it will go into errorCallback of queryTask.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //the alternative is using where to re-query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var objectIdField = this._getObjectIdField();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var where = "";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var count = objectIds.length;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.forEach(objectIds, lang.hitch(this, function(objectId, i){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where += objectIdField + " = " + objectId;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(i !== count - 1){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where += " OR ";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._query(where, null, returnGeometry).then(lang.hitch(this, function(response){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def.resolve(response);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }), lang.hitch(this, function(err){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def.reject(err);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def.reject(err);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return def;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New Code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_queryByObjectIds: function(objectIds, returnGeometry){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var def = new Deferred();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryParams = new EsriQuery();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.returnGeometry = !!returnGeometry;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.outSpatialReference = this.map.spatialReference;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.outFields = this._getOutputFields();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var where = "";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var objectIdField = this._getObjectIdField();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var length = objectIds.length;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; array.forEach(objectIds, lang.hitch(this, function (objectId, i) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where += objectIdField + " = " + objectId;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (i !== length - 1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where += " OR ";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryParams.where = where;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask = new QueryTask(this.currentAttrs.config.url);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(queryParams).then(lang.hitch(this, function(response){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def.resolve(response);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }), lang.hitch(this, function(err){ def.reject(err); }));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return def;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Feb 2016 22:36:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-does-not-show-results-for-feature/m-p/250624#M6787</guid>
      <dc:creator>MatthewTownsend</dc:creator>
      <dc:date>2016-02-02T22:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Query Widget does not show results for Feature joined with view</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-does-not-show-results-for-feature/m-p/250625#M6788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there - fairly old thread but I found myself in this situation this week. I'm using the widget from my Portal so I am unable to adjust the code unless I put the web app on my own IIS server. Which I woudl like to do, just not on the short list right now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to get additional attributes from a different SQL db table to a point feature that has a related (relationship class exists within gdb)table in the same gdb as the point feature.&amp;nbsp; As soon as I publish a service with this join in place, the widget fails in the way you have explained.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My questions is whether or not you ever found another solution and if you think there is any work around within if I'm using this widget from a Portal hosted web app? Mayeb I need to run a process to move teh attributes from teh joined table directly to the related table or point feature itself? IDK, struggling to identify the problem so I can craft my approach.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2019 19:12:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/query-widget-does-not-show-results-for-feature/m-p/250625#M6788</guid>
      <dc:creator>BugPie</dc:creator>
      <dc:date>2019-05-22T19:12:08Z</dc:date>
    </item>
  </channel>
</rss>

