<?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: Feature Layer Filtering in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/feature-layer-filtering/m-p/481678#M3316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Edmundo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a number of ways to do this depending on your specific use case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to filter the features when they are requested from the server, you can create QueryParameters with a where clause (essentially a SQL query string) and use it to populate the feature layer's feature table. Here is an Android samples that shows this:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/service-feature-table-manualcache/src/main/java/com/esri/arcgisruntime/samples/servicefeaturetablemanualcache/MainActivity.java#L80"&gt;https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/service-feature-table-manualcache/src/main/java/com/esri/arcgisruntime/samples/servicefeaturetablemanualcache/MainActivity.java#L80&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a feature layer that is already loaded and displayed, you can filter which features are displayed using a definition expression on the feature layer&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setDefinitionExpression(java.lang.String)"&gt;https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setDefinitionExpression(java.lang.String)&lt;/A&gt;. Here is another sample which shows the definition expression:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/feature-layer-definition-expression/src/main/java/com/esri/arcgisruntime/samples/featurelayerdefinitionexpression/MainActivity.java#L72"&gt;https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/feature-layer-definition-expression/src/main/java/com/esri/arcgisruntime/samples/featurelayerdefinitionexpression/MainActivity.java#L72&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, if you'd prefer to show/hide features manually (without a query expression), you can use&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setFeaturesVisible(java.lang.Iterable,boolean)"&gt;https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setFeaturesVisible(java.lang.Iterable,boolean)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jul 2019 16:25:35 GMT</pubDate>
    <dc:creator>TylerSchiewe</dc:creator>
    <dc:date>2019-07-02T16:25:35Z</dc:date>
    <item>
      <title>Feature Layer Filtering</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/feature-layer-filtering/m-p/481677#M3315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way to filter (and show only) specific features from feature layer? I couldn't find the answer to that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2019 08:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/feature-layer-filtering/m-p/481677#M3315</guid>
      <dc:creator>EdmundoBotner1</dc:creator>
      <dc:date>2019-07-02T08:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Layer Filtering</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/feature-layer-filtering/m-p/481678#M3316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Edmundo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a number of ways to do this depending on your specific use case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to filter the features when they are requested from the server, you can create QueryParameters with a where clause (essentially a SQL query string) and use it to populate the feature layer's feature table. Here is an Android samples that shows this:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/service-feature-table-manualcache/src/main/java/com/esri/arcgisruntime/samples/servicefeaturetablemanualcache/MainActivity.java#L80"&gt;https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/service-feature-table-manualcache/src/main/java/com/esri/arcgisruntime/samples/servicefeaturetablemanualcache/MainActivity.java#L80&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a feature layer that is already loaded and displayed, you can filter which features are displayed using a definition expression on the feature layer&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setDefinitionExpression(java.lang.String)"&gt;https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setDefinitionExpression(java.lang.String)&lt;/A&gt;. Here is another sample which shows the definition expression:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/feature-layer-definition-expression/src/main/java/com/esri/arcgisruntime/samples/featurelayerdefinitionexpression/MainActivity.java#L72"&gt;https://github.com/Esri/arcgis-runtime-samples-android/blob/master/java/feature-layer-definition-expression/src/main/java/com/esri/arcgisruntime/samples/featurelayerdefinitionexpression/MainActivity.java#L72&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively, if you'd prefer to show/hide features manually (without a query expression), you can use&amp;nbsp;&lt;A href="https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setFeaturesVisible(java.lang.Iterable,boolean)"&gt;https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/layers/FeatureLayer.html#setFeaturesVisible(java.lang.Iterable,boolean)&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tyler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2019 16:25:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/feature-layer-filtering/m-p/481678#M3316</guid>
      <dc:creator>TylerSchiewe</dc:creator>
      <dc:date>2019-07-02T16:25:35Z</dc:date>
    </item>
  </channel>
</rss>

