<?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 Combining a Spatial Filter attributes on a query from Feature Layer on a Custom Widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-a-spatial-filter-attributes-on-a-query/m-p/1217686#M78878</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;So currently the custom Widget can query custom inputs from the feature layer by getting the "where" from the user. I also have predefined Spatial Filter information such as the geometryType, geometry, inSR, etc. that I gathered from the Query widget that represents a triangle shape for testing purposes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I were to query it manually from the rest service using the aforementioned information (ex. Location Name Is Not Null with all the spatial information), I get back the records I'm looking for. However, when I do it from the widget, it seems to only care about the 'Where' and ignores pretty much all the Spatial Filter information. The main question is how can I add my Spatial Filter information correctly onto the FeatureLayer.queryCount so that it queries the correct results? Are the current Spatial Filter information even valid?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm essentially trying to see if I'm even inputting my FeatureLayer query request correctly. Any help would be appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;					var geometry = {"rings": [[[-9188924.538427977,3173562.0510628982],[-9188854.174329605,3173440.1768694893],[-9188994.902526349,3173440.1768694893],[-9188924.538427977,3173562.0510628982]]],"spatialReference": {"wkid": 102100}};
					var geometryType='esriGeometryPolygon';
					var inSR="102100";
					
					var query = new Query();
					query.where = where;
					query.geometry = geometry;
					query.geometryType = geometryType;
					query.inSR = inSR; 
					_this.query_where = where;
					_this.query_geometry = query.geometry;
					_this.query_geometryType = query.geometryType;
					_this.query_inSR = query.inSR;
					query.returnGeometry = true; 
					query.outFields = ["*"];


					var featureLayer = new FeatureLayer(url, {
						mode: FeatureLayer.MODE_AUTO
					});
					
					(function(_this, service, url, where, featureLayer) {
						var resultsCallback = function(response) {
							_this._featureCountCheck(_this, service, url, where, featureLayer, response);
						};
                  var errorCallback = function(response) {
                     _this._error(response);
                     _this._queryComplete(_this);
                  };
				  
				  featureLayer.queryCount(query, resultsCallback, errorCallback);
					})(_this, service, url, where, featureLayer);
				}
			},&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Sep 2022 00:09:50 GMT</pubDate>
    <dc:creator>TharSoe</dc:creator>
    <dc:date>2022-09-30T00:09:50Z</dc:date>
    <item>
      <title>Combining a Spatial Filter attributes on a query from Feature Layer on a Custom Widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-a-spatial-filter-attributes-on-a-query/m-p/1217686#M78878</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;So currently the custom Widget can query custom inputs from the feature layer by getting the "where" from the user. I also have predefined Spatial Filter information such as the geometryType, geometry, inSR, etc. that I gathered from the Query widget that represents a triangle shape for testing purposes.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I were to query it manually from the rest service using the aforementioned information (ex. Location Name Is Not Null with all the spatial information), I get back the records I'm looking for. However, when I do it from the widget, it seems to only care about the 'Where' and ignores pretty much all the Spatial Filter information. The main question is how can I add my Spatial Filter information correctly onto the FeatureLayer.queryCount so that it queries the correct results? Are the current Spatial Filter information even valid?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm essentially trying to see if I'm even inputting my FeatureLayer query request correctly. Any help would be appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;					var geometry = {"rings": [[[-9188924.538427977,3173562.0510628982],[-9188854.174329605,3173440.1768694893],[-9188994.902526349,3173440.1768694893],[-9188924.538427977,3173562.0510628982]]],"spatialReference": {"wkid": 102100}};
					var geometryType='esriGeometryPolygon';
					var inSR="102100";
					
					var query = new Query();
					query.where = where;
					query.geometry = geometry;
					query.geometryType = geometryType;
					query.inSR = inSR; 
					_this.query_where = where;
					_this.query_geometry = query.geometry;
					_this.query_geometryType = query.geometryType;
					_this.query_inSR = query.inSR;
					query.returnGeometry = true; 
					query.outFields = ["*"];


					var featureLayer = new FeatureLayer(url, {
						mode: FeatureLayer.MODE_AUTO
					});
					
					(function(_this, service, url, where, featureLayer) {
						var resultsCallback = function(response) {
							_this._featureCountCheck(_this, service, url, where, featureLayer, response);
						};
                  var errorCallback = function(response) {
                     _this._error(response);
                     _this._queryComplete(_this);
                  };
				  
				  featureLayer.queryCount(query, resultsCallback, errorCallback);
					})(_this, service, url, where, featureLayer);
				}
			},&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Sep 2022 00:09:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/combining-a-spatial-filter-attributes-on-a-query/m-p/1217686#M78878</guid>
      <dc:creator>TharSoe</dc:creator>
      <dc:date>2022-09-30T00:09:50Z</dc:date>
    </item>
  </channel>
</rss>

