<?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: Renaming images with  bind::esri:parameters - get photo creation date? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223379#M45421</link>
    <description>&lt;P&gt;Thanks for the catch!&amp;nbsp; ImageDateTime is correct.&amp;nbsp; You got me excited there...&lt;/P&gt;&lt;P&gt;Unfortunately it is looking like the survey doesn't pull in the image exif data until after the image has been saved... meaning that when use the formulas below where I am duplicating the fileName expression in both photo1 and photo2: it fails to pull the ImageDateTime for photo1 but successfully pulls the ImageDateTime of photo1 for photo2.&lt;/P&gt;&lt;P&gt;Photo1&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_", format-date(pulldata("@exif",${photo1}, "imageDateTime"),'%Y%m%d%H%M%S'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Photo2&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_", format-date(pulldata("@exif",${photo1}, "imageDateTime"),'%Y%m%d%H%M%S'))&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Oct 2022 15:29:05 GMT</pubDate>
    <dc:creator>Joshua_Damron</dc:creator>
    <dc:date>2022-10-19T15:29:05Z</dc:date>
    <item>
      <title>Renaming images with  bind::esri:parameters - get photo creation date?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223025#M45404</link>
      <description>&lt;P&gt;Howdy,&lt;/P&gt;&lt;P&gt;I have a survey with 3 image uploads, no repeats are being used.&amp;nbsp; The names used for these in the xlsform are photo1, photo2, photo3.&amp;nbsp; I am using the Survey123 mobile app version 3.15.159 for Android. &amp;nbsp; &amp;nbsp; I would like to build the unique image names from the date/time&amp;nbsp; of the images creation, below are the issues I have encountered: &amp;nbsp; &amp;nbsp; 1) I found that the bind::esri:parameters is not compatible with pulling the date/time from the image file like this: &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_", format-date(pulldata("@exif",${photo2}, "DateTime"),'%Y%m%d%H%M%S'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Am I doing something wrong with the above or is this a known issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) As a 2nd best option I tried using now() to give each image a unique ID however I found that now() doesn't refresh between image uploads.&amp;nbsp; Meaning that this formula was not unique between the images uploaded:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_",format-date(now(),'%Y%m%d'),"-",format-date(now(),'%H%M%S'),"_",substr(pulldata('@property','userFirstName'), 0,2),pulldata('@property','userLastName'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;3) Since those didn't work out, for the moment I am hardcoding a 1/2/3 into the file name for each photo field to force distinct names:&lt;/P&gt;&lt;P&gt;photo1:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_",format-date(now(),'%Y%m%d'),"-",format-date(now(),'%H%M%S'),"-1_",substr(pulldata('@property','userFirstName'), 0,2),pulldata('@property','userLastName'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;photo2:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_",format-date(now(),'%Y%m%d'),"-",format-date(now(),'%H%M%S'),"-2_",substr(pulldata('@property','userFirstName'), 0,2),pulldata('@property','userLastName'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4) To tack on another issue I found, I was not able to retrieve just the first initial of the users first name using this:&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;EM&gt;substr(pulldata('@property','userFirstName'), 0,1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;So instead I am retrieving the first two letters of the name with this:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;EM&gt;substr(pulldata('@property','userFirstName'), 0,2)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any assistance is appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 19:53:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223025#M45404</guid>
      <dc:creator>Joshua_Damron</dc:creator>
      <dc:date>2022-10-18T19:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming images with  bind::esri:parameters - get photo creation date?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223026#M45405</link>
      <description>&lt;P&gt;I think it is ImageDateTime for the exif&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/working-with-exif-image-metadata-in-survey123-for/ba-p/891687" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-blog/working-with-exif-image-metadata-in-survey123-for/ba-p/891687&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Oct 2022 19:59:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223026#M45405</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-10-18T19:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming images with  bind::esri:parameters - get photo creation date?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223379#M45421</link>
      <description>&lt;P&gt;Thanks for the catch!&amp;nbsp; ImageDateTime is correct.&amp;nbsp; You got me excited there...&lt;/P&gt;&lt;P&gt;Unfortunately it is looking like the survey doesn't pull in the image exif data until after the image has been saved... meaning that when use the formulas below where I am duplicating the fileName expression in both photo1 and photo2: it fails to pull the ImageDateTime for photo1 but successfully pulls the ImageDateTime of photo1 for photo2.&lt;/P&gt;&lt;P&gt;Photo1&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_", format-date(pulldata("@exif",${photo1}, "imageDateTime"),'%Y%m%d%H%M%S'))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Photo2&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;fileName=concat(${Record_ID} ,"_", format-date(pulldata("@exif",${photo1}, "imageDateTime"),'%Y%m%d%H%M%S'))&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 15:29:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223379#M45421</guid>
      <dc:creator>Joshua_Damron</dc:creator>
      <dc:date>2022-10-19T15:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: Renaming images with  bind::esri:parameters - get photo creation date?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223547#M45436</link>
      <description>&lt;P&gt;Maybe a if(check for no photo, dont do anything, calc name) ?&lt;/P&gt;&lt;P&gt;Other idea is the new calculation modes and set that to always.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 19:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/renaming-images-with-bind-esri-parameters-get/m-p/1223547#M45436</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-10-19T19:53:08Z</dc:date>
    </item>
  </channel>
</rss>

