<?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: Offline Geodatabase Attachments in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/offline-geodatabase-attachments/m-p/651328#M3294</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laurynas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a couple of things which may be worth considering with your example code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no explicit call to &lt;A href="https://developers.arcgis.com/qt/latest/qml/api-reference/qml-esri-arcgisruntime-attachmentlistmodel.html#fetchAttachments-method"&gt;fetchAttachments&lt;/A&gt;&amp;nbsp;on the attachmentListModel that I can see. That's probably ok, as I think these should be set to autoFetchAttachments - but worth double-checking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second possibility is that, because your geodatabase is offline, the attachments are already "fetched" (e.g. no network request needs to be made). If that is the case, your example would never receive the a&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;ttachmentListModel&lt;/SPAN&gt;.fetchAttachmentsStatusChanged signal (because the status is already complete). If that is the case, you should be able to update your code to check the status first and execute the same logic that you have in your connect statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Apr 2019 13:52:51 GMT</pubDate>
    <dc:creator>LukeSmallwood</dc:creator>
    <dc:date>2019-04-11T13:52:51Z</dc:date>
    <item>
      <title>Offline Geodatabase Attachments</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/offline-geodatabase-attachments/m-p/651327#M3293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have downloaded the Geodatabase thru GeodatabaseSyncTask. with 'returnAttachments: true' as parameter.&lt;/P&gt;&lt;P&gt;I am using click&amp;gt;Identify&amp;gt;Select features on the map, then download attachment thru this code,&lt;/P&gt;&lt;P&gt;code below get attachments from online feature service, geodatabase feature service returns nothing:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN style="text-decoration: underline;"&gt;onSelectFeaturesStatusChanged&lt;/SPAN&gt;:&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;    &lt;/SPAN&gt;&lt;SPAN style="color: #45c6d6;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;(&lt;SPAN&gt;selectFeaturesStatus&lt;/SPAN&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;===&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #66a334;"&gt;Enums&lt;/SPAN&gt;.TaskStatusCompleted)&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;        &lt;/SPAN&gt;&lt;SPAN style="color: #45c6d6;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;(!&lt;SPAN&gt;selectFeaturesResult&lt;/SPAN&gt;.iterator.hasNext)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;            &lt;/SPAN&gt;&lt;SPAN style="color: #45c6d6;"&gt;return&lt;/SPAN&gt;;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;selectedFeature&lt;/SPAN&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;=&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;selectFeaturesResult&lt;/SPAN&gt;.iterator.next();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;attachmentListModel&lt;/SPAN&gt;&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;=&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;&lt;SPAN&gt;selectedFeature&lt;/SPAN&gt;.attachments;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;        &lt;/SPAN&gt;&lt;SPAN&gt;attachmentListModel&lt;/SPAN&gt;.fetchAttachmentsStatusChanged.connect(&lt;SPAN style="color: #45c6d6;"&gt;function&lt;/SPAN&gt;()&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;            &lt;/SPAN&gt;&lt;SPAN style="color: #45c6d6;"&gt;if&lt;/SPAN&gt;(&lt;SPAN&gt;attachmentListModel&lt;/SPAN&gt;.fetchAttachmentsStatus&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;===&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #66a334;"&gt;Enums&lt;/SPAN&gt;.TaskStatusCompleted){&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color: #4564d6;"&gt;console&lt;/SPAN&gt;.log(&lt;SPAN style="color: #d69545;"&gt;"loaded"&lt;/SPAN&gt;);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                &lt;/SPAN&gt;&lt;SPAN style="color: #4564d6;"&gt;console&lt;/SPAN&gt;.log(&lt;SPAN&gt;attachmentListModel&lt;/SPAN&gt;.count);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                &lt;/SPAN&gt;&lt;SPAN&gt;attachmentListModel&lt;/SPAN&gt;.forEach(&lt;SPAN style="color: #45c6d6;"&gt;function&lt;/SPAN&gt;(element,&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;index,&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;array)&lt;SPAN style="color: #bec0c2;"&gt; &lt;/SPAN&gt;{&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #9acfd6;"&gt;element&lt;/SPAN&gt;.fetchDataStatusChanged.connect(&lt;SPAN style="color: #45c6d6;"&gt;function&lt;/SPAN&gt;(){&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                        &lt;/SPAN&gt;&lt;SPAN style="color: #45c6d6;"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color: #9acfd6;"&gt;element&lt;/SPAN&gt;.fetchDataStatus===&lt;SPAN style="color: #66a334;"&gt;Enums&lt;/SPAN&gt;.TaskStatusCompleted){&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                          &lt;/SPAN&gt;&lt;SPAN style="color: #4564d6;"&gt;console&lt;/SPAN&gt;.log(&lt;SPAN style="color: #9acfd6;"&gt;element&lt;/SPAN&gt;.attachmentUrl);&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                        &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                    &lt;/SPAN&gt;});&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                    &lt;/SPAN&gt;&lt;SPAN style="color: #9acfd6;"&gt;element&lt;/SPAN&gt;.fetchData();&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;                &lt;/SPAN&gt;});&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;            &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;        &lt;/SPAN&gt;});&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN style="color: #bec0c2;"&gt;    &lt;/SPAN&gt;}&lt;/PRE&gt;&lt;PRE&gt;}&lt;/PRE&gt;&lt;PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Mar 2019 20:20:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/offline-geodatabase-attachments/m-p/651327#M3293</guid>
      <dc:creator>LaurynasGedminas2</dc:creator>
      <dc:date>2019-03-28T20:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Offline Geodatabase Attachments</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/offline-geodatabase-attachments/m-p/651328#M3294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Laurynas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a couple of things which may be worth considering with your example code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is no explicit call to &lt;A href="https://developers.arcgis.com/qt/latest/qml/api-reference/qml-esri-arcgisruntime-attachmentlistmodel.html#fetchAttachments-method"&gt;fetchAttachments&lt;/A&gt;&amp;nbsp;on the attachmentListModel that I can see. That's probably ok, as I think these should be set to autoFetchAttachments - but worth double-checking.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second possibility is that, because your geodatabase is offline, the attachments are already "fetched" (e.g. no network request needs to be made). If that is the case, your example would never receive the a&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;ttachmentListModel&lt;/SPAN&gt;.fetchAttachmentsStatusChanged signal (because the status is already complete). If that is the case, you should be able to update your code to check the status first and execute the same logic that you have in your connect statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Apr 2019 13:52:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/offline-geodatabase-attachments/m-p/651328#M3294</guid>
      <dc:creator>LukeSmallwood</dc:creator>
      <dc:date>2019-04-11T13:52:51Z</dc:date>
    </item>
  </channel>
</rss>

