<?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: Get Attributes from FeatureLayer.GetSelectedFeaturesAsync() in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590194#M7238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My reply did say call LoadAsync on the Feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mention the type of feature table as clarification because the issue described would not occur with a feature from a GeodatbaseFeatureTable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jul 2019 19:23:32 GMT</pubDate>
    <dc:creator>JoeHershman</dc:creator>
    <dc:date>2019-07-12T19:23:32Z</dc:date>
    <item>
      <title>Get Attributes from FeatureLayer.GetSelectedFeaturesAsync()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590190#M7234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am attempting to search the Attributes property of a Feature to find a specific field name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureLayer flayer = lyr as FeatureLayer;&lt;BR /&gt; FeatureQueryResult queryResult = await flayer.GetSelectedFeaturesAsync();&lt;/P&gt;&lt;P&gt;foreach (Feature feat in queryResult)&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;var catAtt = feat.Attributes.Where(x=&amp;gt;x.Key == "Category");&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although my FeatureLayer has &lt;STRONG&gt;6&lt;/STRONG&gt; editable fields, I find that only&lt;STRONG&gt; 5&lt;/STRONG&gt; attributes are listed within the Attributes property. When I look for 'Category', the search does not return anything although&amp;nbsp;I know the field exists. Is there something that I need to set up on the layer to return all of the Attributes when using the GetSelectedFeaturesAsync() method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 17:22:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590190#M7234</guid>
      <dc:creator>MonikaLucas</dc:creator>
      <dc:date>2019-07-11T17:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attributes from FeatureLayer.GetSelectedFeaturesAsync()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590191#M7235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try calling LoadAsync() on the feature.&amp;nbsp; I assume your using a ServiceFeatureTable , with&amp;nbsp;&lt;SPAN&gt;ServiceFeatureTable&amp;nbsp;only a core set of attributes in returned by default in order to keep the response to a minimum.&amp;nbsp; I believe the&amp;nbsp;LoadAsync()&amp;nbsp; will pull the entire feature with all attributes&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2019 19:35:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590191#M7235</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2019-07-11T19:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attributes from FeatureLayer.GetSelectedFeaturesAsync()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590192#M7236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick response! I was trying the addition of 'LoadAsync' on the feature today but I am still not getting all of the attributes. You are right that I am using an online feature service. When I look at the properties of the FeatureTable both before and after running LoadAsync() I do have all 10 fields but the attributes still include only 4 key,value pairs.&amp;nbsp;&amp;nbsp;Have I missed something here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LayerCollection lyrColl = Map.OperationalLayers;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Layer lyr = lyrColl[0];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FeatureLayer flayer = lyr as FeatureLayer;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; FeatureQueryResult queryResult = await flayer.GetSelectedFeaturesAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach (Feature feat in queryResult)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;await feat.FeatureTable.LoadAsync();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;...and so on...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 19:03:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590192#M7236</guid>
      <dc:creator>MonikaLucas</dc:creator>
      <dc:date>2019-07-12T19:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attributes from FeatureLayer.GetSelectedFeaturesAsync()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590193#M7237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just after I sent my last response I added another line of code to get the ArcGISFeature and that worked! Thanks for your reply, it essentially fixed my issue!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach (Feature feat in queryResult)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;ArcGISFeature arcFeat = feat as ArcGISFeature;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;await arcFeat.LoadAsync();&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 19:13:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590193#M7237</guid>
      <dc:creator>MonikaLucas</dc:creator>
      <dc:date>2019-07-12T19:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attributes from FeatureLayer.GetSelectedFeaturesAsync()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590194#M7238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My reply did say call LoadAsync on the Feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I mention the type of feature table as clarification because the issue described would not occur with a feature from a GeodatbaseFeatureTable&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 19:23:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590194#M7238</guid>
      <dc:creator>JoeHershman</dc:creator>
      <dc:date>2019-07-12T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attributes from FeatureLayer.GetSelectedFeaturesAsync()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590195#M7239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right! That definitely answered my question.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Jen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2019 20:11:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590195#M7239</guid>
      <dc:creator>MonikaLucas</dc:creator>
      <dc:date>2019-07-12T20:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Get Attributes from FeatureLayer.GetSelectedFeaturesAsync()</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590196#M7240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you know up front that you are for sure going to need all the attributes for all the features, you can set the QueryFeatureFields to "LoadAll" and it'll fetch all data.&lt;/P&gt;&lt;P&gt;The idea is that you might be querying 1000s of features, so instead of downloading ALL data, we fetch the minimum to render/display them, and once you click at a feature, you'd go and fetch the full data just for that one feature. So the default is configured for performance-first. However there might be cases where you know you'll get a very limited set of results back,&amp;nbsp;or you know you're going to need all the attributes from all the features, and&amp;nbsp;you can then use this call to avoid the extra LoadAsync call and webrequest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/net/latest/wpf/api-reference/html/Overload_Esri_ArcGISRuntime_Data_ServiceFeatureTable_QueryRelatedFeaturesAsync.htm" title="https://developers.arcgis.com/net/latest/wpf/api-reference/html/Overload_Esri_ArcGISRuntime_Data_ServiceFeatureTable_QueryRelatedFeaturesAsync.htm"&gt;ServiceFeatureTable.QueryRelatedFeaturesAsync Method&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2020 16:09:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-attributes-from-featurelayer/m-p/590196#M7240</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2020-03-13T16:09:34Z</dc:date>
    </item>
  </channel>
</rss>

