<?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: Update Previous Inspection Date in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1316254#M6717</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/183291"&gt;@JustinReynolds&lt;/a&gt;&amp;nbsp;, I appreciate you taking the time to assist with this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 01:47:38 GMT</pubDate>
    <dc:creator>DMH_Hobart</dc:creator>
    <dc:date>2023-08-08T01:47:38Z</dc:date>
    <item>
      <title>Update Previous Inspection Date</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1315895#M6710</link>
      <description>&lt;P&gt;We have a field map that has a number of date / time attributes.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Current Inspection Date&lt;/LI&gt;&lt;LI&gt;Current Inspection Time&lt;/LI&gt;&lt;LI&gt;Previous Inspection Date&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;Previous Inspection Time&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If I change the current inspection date / time, how do I get the previous date / time to be the replaced by the old current date / time automatically?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 04:48:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1315895#M6710</guid>
      <dc:creator>DMH_Hobart</dc:creator>
      <dc:date>2023-08-07T04:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Update Previous Inspection Date</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1315920#M6711</link>
      <description>&lt;P&gt;I guess it might be possible to achieve what you want with Arcade but a better option would be to use a related table to store the inspections. Then you can easily keep the whole history of inspections in that table. Here is the first in a series of six videos outlining how to achieve this:&amp;nbsp;&lt;A href="https://www.youtube.com/watch?v=v0W6X6ovi_Q" target="_blank"&gt;Inspection Workflows Part 1: Building &amp;amp; Publishing Related Tables - YouTube&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 06:49:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1315920#M6711</guid>
      <dc:creator>AndreasHall</dc:creator>
      <dc:date>2023-08-07T06:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update Previous Inspection Date</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1316035#M6715</link>
      <description>&lt;P&gt;Assuming you're creating and updating the same feature (not related records) you can you $originalFeature on Update.&amp;nbsp; $originalFeature contains the attribute values as they were last submitted to the database.&lt;/P&gt;&lt;P&gt;In this example I created two fields and added a form calculation to the the_previous_date field.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;the_current_date&lt;/LI&gt;&lt;LI&gt;the_previous_date&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Example: Using $originalFeature to access attributes from the previous form submission" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77451i9E0D7BA7C585DE7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JustinReynolds_0-1691417222648.png" alt="Example: Using $originalFeature to access attributes from the previous form submission" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Example: Using $originalFeature to access attributes from the previous form submission&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// check the editType becuase $originalFeature isn't applicable on INSERT
if ($editcontext.editType == 'UPDATE') { 
  if (!IsEmpty($originalFeature.the_current_date)) {
    return $originalFeature.the_current_date;
  };
  // no previous inspection if current inspection date is null
};
// no previous inspection date on INSERT (new inspection)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here is what it looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="calc_previous_date.gif" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/77452i0B5642A5C44711E9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="calc_previous_date.gif" alt="calc_previous_date.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 15:39:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1316035#M6715</guid>
      <dc:creator>JustinReynolds</dc:creator>
      <dc:date>2023-08-07T15:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update Previous Inspection Date</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1316254#M6717</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/183291"&gt;@JustinReynolds&lt;/a&gt;&amp;nbsp;, I appreciate you taking the time to assist with this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 01:47:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/update-previous-inspection-date/m-p/1316254#M6717</guid>
      <dc:creator>DMH_Hobart</dc:creator>
      <dc:date>2023-08-08T01:47:38Z</dc:date>
    </item>
  </channel>
</rss>

