<?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: Enterprise Survey123 photo transfer Microsoft Power Automate in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1170076#M42513</link>
    <description>&lt;P&gt;Not certain if this will&amp;nbsp; help. I had a project were the Field Crew Lead wanted all photos taken transferred to to a specific drive.&amp;nbsp; This script would copy all attachment's and transfer them to a directory on my C: drive&lt;/P&gt;&lt;P&gt;For the inTable&amp;nbsp; you will want to change database name to your specific database name. Essentially making a path direct to the attachments table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saved this as a python script so I could run it every Monday.&amp;nbsp; I don' t know if you will be able to plop them direct into a One Drive folder but you could send them to your C: drive and then combine the script in a .bat file to copy them direct to One Drive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, all that aside.&amp;nbsp; You should try to convince the end users to use a Dashboard&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy import da&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;inTable = "Database Connections\\&amp;lt;database name&amp;gt;.sde\\GIS.SitePhotos_WORKGROUPS__ATTACH"&lt;BR /&gt;fileLocation = "C:\Photos700\ExtBTS"&lt;/P&gt;&lt;P&gt;with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID']) as cursor:&lt;BR /&gt;for item in cursor:&lt;BR /&gt;attachment = item[0]&lt;BR /&gt;filenum = str(item[-1]) + ".jpg"&lt;BR /&gt;filename = filenum&lt;BR /&gt;open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes())&lt;BR /&gt;del item&lt;BR /&gt;del filenum&lt;BR /&gt;del filename&lt;BR /&gt;del attachment&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2022 12:56:02 GMT</pubDate>
    <dc:creator>RobertBorchert</dc:creator>
    <dc:date>2022-05-03T12:56:02Z</dc:date>
    <item>
      <title>Enterprise Survey123 photo transfer Microsoft Power Automate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1169928#M42502</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am currently using Microsoft Power Automate (PA) to move tabular data from a Survey123 published through enterprise. This works well with custom expressions for each attribute. I am trying to pull photos submitted with the surveys and dump them into a OneDrive folder. My issue is that PA does not give me the dynamic content calls for my photos in the survey. When trying to follow the instructions outlined here&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-working-with/bc-p/1169889#M5092" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-working-with/bc-p/1169889#M5092&lt;/A&gt;&amp;nbsp;I am unable to direct the URL to the photo, as there is no dynamic content for my attached photos.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to call the photos with a similar expression as all my other feature attributes I have in the survey but I am not having luck here is the expression.&amp;nbsp; triggerBody()?['feature']?['attachments']['inspect_photos']&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone successfully moved photos from an Enterprise Survey123 through PA?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 21:37:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1169928#M42502</guid>
      <dc:creator>Michael_VanHatten</dc:creator>
      <dc:date>2022-05-02T21:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Survey123 photo transfer Microsoft Power Automate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1169939#M42503</link>
      <description>&lt;P&gt;I am able to grab my attachments and place them in an email, I'm sure you could do the same into a folder.&lt;/P&gt;&lt;P&gt;Did you initialize an array variable for your photos?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TL2_0-1651528649899.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40361iD2F411A82168F7EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TL2_0-1651528649899.png" alt="TL2_0-1651528649899.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TL2_1-1651528675049.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/40362i94213B5557816108/image-size/medium?v=v2&amp;amp;px=400" role="button" title="TL2_1-1651528675049.png" alt="TL2_1-1651528675049.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 21:59:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1169939#M42503</guid>
      <dc:creator>TL2</dc:creator>
      <dc:date>2022-05-02T21:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Survey123 photo transfer Microsoft Power Automate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1170076#M42513</link>
      <description>&lt;P&gt;Not certain if this will&amp;nbsp; help. I had a project were the Field Crew Lead wanted all photos taken transferred to to a specific drive.&amp;nbsp; This script would copy all attachment's and transfer them to a directory on my C: drive&lt;/P&gt;&lt;P&gt;For the inTable&amp;nbsp; you will want to change database name to your specific database name. Essentially making a path direct to the attachments table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I saved this as a python script so I could run it every Monday.&amp;nbsp; I don' t know if you will be able to plop them direct into a One Drive folder but you could send them to your C: drive and then combine the script in a .bat file to copy them direct to One Drive.&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, all that aside.&amp;nbsp; You should try to convince the end users to use a Dashboard&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy import da&lt;BR /&gt;import os&lt;/P&gt;&lt;P&gt;inTable = "Database Connections\\&amp;lt;database name&amp;gt;.sde\\GIS.SitePhotos_WORKGROUPS__ATTACH"&lt;BR /&gt;fileLocation = "C:\Photos700\ExtBTS"&lt;/P&gt;&lt;P&gt;with da.SearchCursor(inTable, ['DATA', 'ATT_NAME', 'ATTACHMENTID']) as cursor:&lt;BR /&gt;for item in cursor:&lt;BR /&gt;attachment = item[0]&lt;BR /&gt;filenum = str(item[-1]) + ".jpg"&lt;BR /&gt;filename = filenum&lt;BR /&gt;open(fileLocation + os.sep + filename, 'wb').write(attachment.tobytes())&lt;BR /&gt;del item&lt;BR /&gt;del filenum&lt;BR /&gt;del filename&lt;BR /&gt;del attachment&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 12:56:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1170076#M42513</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2022-05-03T12:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Survey123 photo transfer Microsoft Power Automate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1172025#M42646</link>
      <description>&lt;P&gt;Are you using an Enterprise Connection? If so how are you calling your attachments (photos) I get no dynamic content for any attachments or photos I am trying to write a expression to call my photos but that is not working for me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 15:48:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1172025#M42646</guid>
      <dc:creator>Michael_VanHatten</dc:creator>
      <dc:date>2022-05-09T15:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Survey123 photo transfer Microsoft Power Automate</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1172028#M42647</link>
      <description>&lt;P&gt;I have a 'feature attachments' dynamic content option.&amp;nbsp; This will not appear in the email attachments field, it will only appear as an option when setting up an array because it is can contain multiple values.&amp;nbsp; You must initialize an array from 'feature attachments'&lt;/P&gt;&lt;P&gt;Side note, I have found the enterprise connection to be very janky and often disconnects from portal.&amp;nbsp; I have about 4 connections because I often had to create a new connection to reconnect the survey.&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 16:00:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/enterprise-survey123-photo-transfer-microsoft/m-p/1172028#M42647</guid>
      <dc:creator>TL2</dc:creator>
      <dc:date>2022-05-09T16:00:01Z</dc:date>
    </item>
  </channel>
</rss>

