<?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 Getting Field information off Sublayer of a MapImage Layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734876#M68080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating an application with arcgis js 4.8 api. I bring in a WebMap into this application, which has a MapImage Layer. This MapImage Layer has multiple sublayers. I need to know the fields that exist in these sublayers, and I also need to know the type of each field (number, string... etc). The sublayer interface is here:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html"&gt;Sublayer | API Reference | ArcGIS API for JavaScript 4.9&lt;/A&gt;. I can use the "popupTemplate" in the sublayer and then go into the fieldInfos property of that to get the names of the fields, however that does not have the type information for each field. Does anyone have any idea how to get the type information for each field of a sublayer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Oct 2018 03:03:26 GMT</pubDate>
    <dc:creator>deleted-user----ypwdOWHsd</dc:creator>
    <dc:date>2018-10-04T03:03:26Z</dc:date>
    <item>
      <title>Getting Field information off Sublayer of a MapImage Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734876#M68080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating an application with arcgis js 4.8 api. I bring in a WebMap into this application, which has a MapImage Layer. This MapImage Layer has multiple sublayers. I need to know the fields that exist in these sublayers, and I also need to know the type of each field (number, string... etc). The sublayer interface is here:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html"&gt;Sublayer | API Reference | ArcGIS API for JavaScript 4.9&lt;/A&gt;. I can use the "popupTemplate" in the sublayer and then go into the fieldInfos property of that to get the names of the fields, however that does not have the type information for each field. Does anyone have any idea how to get the type information for each field of a sublayer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 03:03:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734876#M68080</guid>
      <dc:creator>deleted-user----ypwdOWHsd</dc:creator>
      <dc:date>2018-10-04T03:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Field information off Sublayer of a MapImage Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734877#M68081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cameron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Full field info data is not available from the Sublayer object you will have to get the sublayer url and make an esriRequest to the sublayer to get the field data.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;esriRequest&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;findSublayerById&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; responseType&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"json"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp; query&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"f=json"&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;then&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;response&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="comment token"&gt;// The requested data&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; lyrJson &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; response&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;data&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyrJson&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;fields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:20:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734877#M68081</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T07:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Field information off Sublayer of a MapImage Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734878#M68082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Understood. Thanks a lot Robert!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2018 13:10:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734878#M68082</guid>
      <dc:creator>deleted-user----ypwdOWHsd</dc:creator>
      <dc:date>2018-10-04T13:10:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Field information off Sublayer of a MapImage Layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734879#M68083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at all.&lt;/P&gt;&lt;P&gt;Since API version 4.15 you can access the field property auf a sublayer. For details see&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#fields" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#fields"&gt;Sublayer | ArcGIS API for JavaScript 4.16&lt;/A&gt;&amp;nbsp;. Just call the function "load" of the sublayer. After that you can access all fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Sep 2020 06:44:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-field-information-off-sublayer-of-a/m-p/734879#M68083</guid>
      <dc:creator>MartinLohoff</dc:creator>
      <dc:date>2020-09-17T06:44:09Z</dc:date>
    </item>
  </channel>
</rss>

