<?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: ArcGIS JS Api 4.9 attachments not displaying in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10834#M1033</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are running into that issue because &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryAttachments" rel="nofollow noopener noreferrer" target="_blank"&gt;FeatureLayer.queryAttachments&lt;/A&gt; return type is wrongly documented. It does not return an array on AttachmentInfos. Instead it returns object containing &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo" rel="nofollow noopener noreferrer" target="_blank"&gt;AttachmentInfos&lt;/A&gt;&amp;nbsp;grouped by the source feature ObjectIds. So you have to find the attachments by its objectId as shown below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryAttachments&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;attachmentQuery&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;attachments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"attachments:"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; attachments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"length of attachments"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Object&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;keys&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;attachments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp; attachmentQuery&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectIds&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;forEach&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;objectId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;attachments&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;objectId&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; attachment &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; attachments&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;objectId&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;group&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"attachment for"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; objectId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attachment&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;forEach&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;item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"attachment id"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"content type"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;contentType&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"size"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;size&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"url"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;groupEnd&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &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="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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a&lt;A href="https://codepen.io/anon/pen/vQOKLQ?editors=1000" rel="nofollow noopener noreferrer" target="_blank"&gt; test app&lt;/A&gt;&amp;nbsp;that shows what is described above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We will update the document to show the right return type for queryAttachments method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:28:01 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2021-12-10T20:28:01Z</dc:date>
    <item>
      <title>ArcGIS JS Api 4.9 attachments not displaying</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10833#M1032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;I have a Typescript SPA using ArcGIS JS Api 4.9.&amp;nbsp; When I query the layer for attachments I receive a attachment info array with the correct values.&amp;nbsp; When I try and display the items in the array I receive undefined?&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #c586c0;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;layer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;capabilities&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;supportsAttachment&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentQuery&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;objectIds:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;feature&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;getAttribute&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'OBJECTID'&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; };&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;layer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;queryAttachments&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentQuery&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;).&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentInfos&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;esri&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;AttachmentInfo&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;[]) &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;console&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;log&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'Attachment infos: '&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentInfos&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;console&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;log&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'Attachment 0: '&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentInfos&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;]);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #c586c0;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;let&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #b5cea8;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentInfos&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;++&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;element&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentInfos&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;index&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;console&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;log&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'Element: '&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;element&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachmentInfos&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;forEach&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachment&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;console&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;log&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'Attachment: '&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachment&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;contentType&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; });&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: transparent; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; word-wrap: break-word; padding: 0px; margin: 0px;"&gt;The above code produces:&lt;/P&gt;&lt;OL style="background-color: transparent; color: #000000; font-family: &amp;amp;quot; consolas&amp;amp;quot;,&amp;amp;quot;lucida console&amp;amp;quot;,monospace; font-size: 12px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px;"&gt;&lt;LI data-css-ol6ego="" style="display: flex; list-style-type: none;"&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-5dg0ga="" style="border-bottom-color: #ededed; border-bottom-style: solid; border-bottom-width: 1px; display: flex; padding: 4px 6px 4px 6px;"&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;SPAN style="display: inline; list-style-type: none;"&gt;Attachment infos: [object Object]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV data-css-1jw2j5g="" style="padding-left: 16px;"&gt; &lt;/DIV&gt;&lt;OL style="padding: 0px; margin: 0px;"&gt;&lt;LI data-css-13tekh8="" style="border-bottom-color: #ededed; border-bottom-style: solid; border-bottom-width: 1px; display: flex; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 4px 6px 4px 18px;"&gt;&lt;DIV style="display: block; height: 14px; margin-right: 4px; width: 14px;"&gt; &lt;/DIV&gt;&lt;DIV style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;DIV style="display: flex; justify-content: flex-end; margin-bottom: 2px;"&gt;&lt;A href="http://cha11681.cha-llp.com:4200/app-survey-survey-module.js" style="border-bottom-color: #0066cc; border-bottom-style: none; border-bottom-width: 0px; display: block; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;app-survey-survey-module.js (4677,17)&lt;/A&gt;&lt;/DIV&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;[object Object]: &lt;SPAN data-css-1h31fiy="" style="color: #2b91af;"&gt;{&lt;/SPAN&gt;&lt;SPAN data-css-1gv1yn1="" style="color: #1e1e1e;"&gt;3: &lt;/SPAN&gt;&lt;SPAN data-css-1h31fiy="" style="color: #2b91af;"&gt;Array&lt;/SPAN&gt;&lt;SPAN data-css-1h31fiy="" style="color: #2b91af;"&gt;}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV data-css-1jw2j5g="" style="padding-left: 16px;"&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;3: &lt;SPAN data-css-1h31fiy="" style="color: #2b91af;"&gt;Array&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV data-css-1jw2j5g="" style="padding-left: 16px;"&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-7ai88k="" style="bottom: 3px; left: 8px; position: absolute; top: 11px; width: 4px; z-index: 1; border-width: 1px; border-color: transparent transparent #b6b6b6 #b6b6b6; border-style: solid;"&gt; &lt;/DIV&gt;&lt;DIV data-css-1cbtao5="" style="background-color: rgba(191, 205, 219, 0.25); display: flex;"&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;0: &lt;SPAN data-css-1h31fiy="" style="color: #2b91af;"&gt;Object&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV data-css-1jw2j5g="" style="padding-left: 16px;"&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;contentType: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;"application/pdf"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;globalId: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;"{108EB461-CA2B-4F31-8E59-3F20E32D3712}"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;id: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;name: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;"141 Printer map.pdf"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;parentGlobalId: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;"{EEED886E-3700-47DF-98F6-341506BD33E0}"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;parentObjectId: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;3&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;size: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;2373144&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;url: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fvmw-lsarcsrv.engineering.dom%2Fserver%2Frest%2Fservices%2FNovara_Survey_1%2FFeatureServer%2F3%2F3%2Fattachments%2F1%3Ftoken%3Dfw7ceIigGDAdenbNniGeTdLgWi_cxNYQKx7hr_ZKTa__NocKctBbOFqL2XG-Zw3Erod22ZEOxzodFQRYQfCUm4V5zv2qnItQM6q2QyTQiO-0TY8VSe3q25Av3h8HftfWiaJzlChaMBqbXavgA2qGMd_Si7PmVHnuzSxhew90hoD-RHrmZ8X5YdB9t496cRwfTRS5smwl8qrzdRnfyZ8yVKPlU3_OUHOy19AC-611pK0h6aovIzPMjAwoHvwPVYq_sWi2or_kyQHkLksa6kvYp_IphsN4Uz5-p6vSEBWO02w" rel="nofollow" target="_blank"&gt;https://vmw-lsarcsrv.engineering.dom/server/rest/services/Novara_Survey_1/FeatureServer/3/3/attachments/1?token=fw7ceIigGDAdenbNniGeTdLgWi_cxNYQKx7hr_ZKTa__NocKctBbOFqL2XG-Zw3Erod22ZEOxzodFQRYQfCUm4V5zv2qnItQM6q2QyTQiO-0TY8VSe3q25Av3h8HftfWiaJzlChaMBqbXavgA2qGMd_Si7PmVHnuzSxhew90hoD-RHrmZ8X5YdB9t496cRwfTRS5smwl8qrzdRnfyZ8yVKPlU3_OUHOy19AC-611pK0h6aovIzPMjAwoHvwPVYq_sWi2or_kyQHkLksa6kvYp_IphsN4Uz5-p6vSEBWO02w&lt;/A&gt;&lt;SPAN&gt;."&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;__proto__: &lt;SPAN data-css-1h31fiy="" style="color: #2b91af;"&gt;Object&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-19undzj="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; margin-left: 16px;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;length: &lt;SPAN data-css-4lx5wp="" style="color: #a31515;"&gt;"1"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV style="position: relative;"&gt;&lt;DIV data-css-1cqgl9p="" style="display: flex;"&gt;&lt;DIV data-css-mfy564="" style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1;"&gt;&lt;SPAN style="border-bottom-color: #000000; border-bottom-style: none; border-bottom-width: 0px; display: inline; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 0px;"&gt;__proto__: &lt;SPAN data-css-1h31fiy="" style="color: #2b91af;"&gt;Object&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/LI&gt;&lt;LI data-css-14za1ga="" style="border-bottom-color: #ededed; border-bottom-style: solid; border-bottom-width: 1px; display: flex; list-style-type: none; -ms-user-select: text; word-break: break-all; padding: 4px 6px 4px 6px;"&gt;&lt;DIV style="display: block; height: 14px; margin-right: 4px; width: 14px;"&gt; &lt;/DIV&gt;&lt;DIV style="flex-basis: 0%; flex-grow: 1; flex-shrink: 1; white-space: pre-wrap;"&gt;Attachment 0: undefined&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2018 19:06:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10833#M1032</guid>
      <dc:creator>PaulGiard</dc:creator>
      <dc:date>2018-11-05T19:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS Api 4.9 attachments not displaying</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10834#M1033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are running into that issue because &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#queryAttachments" rel="nofollow noopener noreferrer" target="_blank"&gt;FeatureLayer.queryAttachments&lt;/A&gt; return type is wrongly documented. It does not return an array on AttachmentInfos. Instead it returns object containing &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-QueryTask.html#AttachmentInfo" rel="nofollow noopener noreferrer" target="_blank"&gt;AttachmentInfos&lt;/A&gt;&amp;nbsp;grouped by the source feature ObjectIds. So you have to find the attachments by its objectId as shown below:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;queryAttachments&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;attachmentQuery&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;attachments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"attachments:"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; attachments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"length of attachments"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Object&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;keys&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;attachments&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp; attachmentQuery&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;objectIds&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;forEach&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;objectId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;attachments&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;objectId&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; attachment &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; attachments&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;objectId&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;group&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"attachment for"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; objectId&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; attachment&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;forEach&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;item&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"attachment id"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"content type"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;contentType&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"size"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;size&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;&lt;SPAN class="string token"&gt;"url"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; item&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;groupEnd&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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp; &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="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;/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;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a&lt;A href="https://codepen.io/anon/pen/vQOKLQ?editors=1000" rel="nofollow noopener noreferrer" target="_blank"&gt; test app&lt;/A&gt;&amp;nbsp;that shows what is described above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We will update the document to show the right return type for queryAttachments method.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10834#M1033</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-12-10T20:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS Api 4.9 attachments not displaying</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10835#M1034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response Undral,&lt;/P&gt;&lt;P&gt;I tried this code before I posted my question.&amp;nbsp; When I use the code above the attachment does not accept the forEach&lt;/P&gt;&lt;P&gt;I am using ArcGIS-js 4.9 Angular and Typescript, your test app is using ArcGIS 4.10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #569cd6;"&gt;const&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachment&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachments&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;objectId&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #4ec9b0;"&gt;console&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;group&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #ce9178;"&gt;'attachment for'&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;objectId&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;attachment&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;forEach&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;element&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #569cd6;"&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2018 21:20:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10835#M1034</guid>
      <dc:creator>PaulGiard</dc:creator>
      <dc:date>2018-11-05T21:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS Api 4.9 attachments not displaying</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10836#M1035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh sorry. I updated the app to use version 4.9. Here it is&amp;nbsp;&lt;A class="link-titled" href="https://codepen.io/anon/pen/vQOKLQ?editors=1000" title="https://codepen.io/anon/pen/vQOKLQ?editors=1000"&gt;FeatureLayer.queryAttachments - 4.9&lt;/A&gt;&amp;nbsp;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;foreach wont work because queryAttachments does not return array. It returns an object containing AttachmentInfo objects.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2018 21:47:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10836#M1035</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2018-11-05T21:47:51Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS Api 4.9 attachments not displaying</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10837#M1036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Undral,&amp;nbsp; I am able to get to the attachments now.&amp;nbsp; Will this code continue to work in 4.10?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are Related Features queried for in the same way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 13:45:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10837#M1036</guid>
      <dc:creator>PaulGiard</dc:creator>
      <dc:date>2018-11-06T13:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JS Api 4.9 attachments not displaying</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10838#M1037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes it will. The issue is not in the code. This issue is because the return type for FeatureLayer.queryAttachments is wrongly documented. It does not return array instead it returns an object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 16:25:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-js-api-4-9-attachments-not-displaying/m-p/10838#M1037</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2018-11-06T16:25:56Z</dc:date>
    </item>
  </channel>
</rss>

