<?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 Fields Types of a map service layer  (AGSFeatureLayer) in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/get-fields-types-of-a-map-service-layer-nbsp/m-p/534906#M4590</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Once you have your queryTask dictionary, you could do something like this ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; NSString * s= [MyDictionary objectForKey : @"NUMBER_DATA"] ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;double myNumber = [s floatValue] ;&amp;nbsp; or [s intvalue] ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this what you are trying to do ??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Aug 2010 08:38:05 GMT</pubDate>
    <dc:creator>HarikantJammi</dc:creator>
    <dc:date>2010-08-18T08:38:05Z</dc:date>
    <item>
      <title>Get Fields Types of a map service layer  (AGSFeatureLayer)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/get-fields-types-of-a-map-service-layer-nbsp/m-p/534905#M4589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for a way to get the fields types of a map service layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've found inside the AGSFeatureLayer class (undocumented) that there are the properties that can solve my problem, but I don't know to use it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just want to read the types of the fields because I have to sum the numeric fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I do a query task the resulting NSDictionary has all strings, but I know that some of them are numeric.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have to do a url request to get the json representation of the layer? Or I can use the AGSFeatureLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Marco&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 19:48:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/get-fields-types-of-a-map-service-layer-nbsp/m-p/534905#M4589</guid>
      <dc:creator>MarcoBrugna</dc:creator>
      <dc:date>2010-08-16T19:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Get Fields Types of a map service layer  (AGSFeatureLayer)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/get-fields-types-of-a-map-service-layer-nbsp/m-p/534906#M4590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Once you have your queryTask dictionary, you could do something like this ,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; NSString * s= [MyDictionary objectForKey : @"NUMBER_DATA"] ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;double myNumber = [s floatValue] ;&amp;nbsp; or [s intvalue] ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this what you are trying to do ??&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 08:38:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/get-fields-types-of-a-map-service-layer-nbsp/m-p/534906#M4590</guid>
      <dc:creator>HarikantJammi</dc:creator>
      <dc:date>2010-08-18T08:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get Fields Types of a map service layer  (AGSFeatureLayer)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/get-fields-types-of-a-map-service-layer-nbsp/m-p/534907#M4591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Once you have your queryTask dictionary, you could do something like this ,&lt;BR /&gt;&lt;BR /&gt; NSString * s= [MyDictionary objectForKey : @"NUMBER_DATA"] ;&lt;BR /&gt;double myNumber = [s floatValue] ;&amp;nbsp; or [s intvalue] ;&lt;BR /&gt;&lt;BR /&gt;Is this what you are trying to do ??&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, yes&amp;nbsp; and no &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The fact is that I don't know which are the fields that have numeric values, and I can't use your method because I may have a field with some unique codes like 1/2/3 or L1/L2/L3 together.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So I have to check all rows to be sure that all are numeric.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I did a workaround.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do a request with f=json to the mapservice. I also have seen that ArcGIS library implements SBJson library to parse the json to NSDictionary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I can then use the JSONValue method from the NSString object and finally get the "fields" attribute from the json data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With the fields list I filer only those with type like &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;esriFieldTypeDouble, esriFieldTypeInteger , esriFieldTypeSmallInteger,esriFieldTypeSingle&lt;/PRE&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And now I can present a list with only the fields that I'm sure have only numbers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Aug 2010 15:02:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/get-fields-types-of-a-map-service-layer-nbsp/m-p/534907#M4591</guid>
      <dc:creator>MarcoBrugna</dc:creator>
      <dc:date>2010-08-18T15:02:22Z</dc:date>
    </item>
  </channel>
</rss>

