<?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 against an in in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819628#M7229</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lefteris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; When you create a FeatureLayer from a feature collection you are limited to what functionality it has as noted in the FeatureLayer Help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;Creates a new instance of a feature layer using a FeatureCollection object. The feature layer, when initialized with a feature collection object has the following behavior:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Edits are applied on the client not posted to the server.&lt;/LI&gt;&lt;LI&gt;The feature layer generates a unique object id for new features.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Does not support queries that need to be performed on the server, e.g. queries with a where clause or non-extent based spatial queries.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The feature layer toJson method returns an object with the same properties as the feature collection. The returned object includes all the features that are in the layer when the method is called. This method can be used to access a serializable representation of the features that can be saved on the server.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 10 Feb 2016 12:58:02 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-02-10T12:58:02Z</dc:date>
    <item>
      <title>query against features from imported shapefile</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819627#M7228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i use the addshapefile widget to add a widget to the map and then I tried to run a query to capture features of the shapefile that intercept the buffer around a line segment. However I get the message:&lt;/P&gt;&lt;P&gt;"FeatureLayer::selectFeatures - query contains one or more unsupported parameters".&lt;/P&gt;&lt;P&gt;Can the feature layer from the shapefile be used for query?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;myfeaturelayer is the feature layer from the shapefile created from:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arrayUtils.forEach(featureCollection.layers, lang.hitch(this, function (layer) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var infoTemplate = new InfoTemplate("Details", "${*}");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var featureLayer = new FeatureLayer(layer, {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate: infoTemplate
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Buffer Widget:&lt;/P&gt;&lt;P&gt;The resultEvent is the geometry of a line&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var myquery = new Query();
&amp;nbsp; myquery.geometry = resultEvent;
&amp;nbsp; myquery.returnGeometry = true;
&amp;nbsp; myquery.outFields = ["*"];
&amp;nbsp; myquery.outSpatialReference = this.map.spatialReference;
&amp;nbsp; myquery.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;
&amp;nbsp; this.myfeatureLayer.selectFeatures(myquery,FeatureLayer.SELECTION_NEW);&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819627#M7228</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-12-12T09:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: query against an in</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819628#M7229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lefteris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; When you create a FeatureLayer from a feature collection you are limited to what functionality it has as noted in the FeatureLayer Help:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4d4d4d; font-family: 'Lucida Grande', 'Segoe UI', Arial, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: start; text-indent: 0px;"&gt;Creates a new instance of a feature layer using a FeatureCollection object. The feature layer, when initialized with a feature collection object has the following behavior:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Edits are applied on the client not posted to the server.&lt;/LI&gt;&lt;LI&gt;The feature layer generates a unique object id for new features.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Does not support queries that need to be performed on the server, e.g. queries with a where clause or non-extent based spatial queries.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;The feature layer toJson method returns an object with the same properties as the feature collection. The returned object includes all the features that are in the layer when the method is called. This method can be used to access a serializable representation of the features that can be saved on the server.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 12:58:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819628#M7229</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-02-10T12:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: query against an in</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819629#M7230</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert. Got one more question. the text in bold states "&lt;SPAN style="font-weight: bold; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;queries with a where clause or non-extent based spatial queries". &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The query that I am using has no where clause.&amp;nbsp; If I replace the geometry of the query with an extent to create an extent based query, will that work?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var queryExtent = new esri.geometry.Extent(x-tol,y-tol,x+tol,y+tol,evt.mapPoint.spatialReference);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;myquery.geometry = queryExtent;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:43:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819629#M7230</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2021-12-12T09:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: query against an in</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819630#M7231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lefteris,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Based on the use notes, that should work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 15:29:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819630#M7231</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-02-10T15:29:56Z</dc:date>
    </item>
    <item>
      <title>Re: query against features from imported shapefile</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819631#M7232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just checked it. It does work. Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Feb 2016 17:41:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/query-against-features-from-imported-shapefile/m-p/819631#M7232</guid>
      <dc:creator>LefterisKoumis</dc:creator>
      <dc:date>2016-02-10T17:41:05Z</dc:date>
    </item>
  </channel>
</rss>

