<?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: editcontext.editType expression unable to submit in ArcGIS Field Maps Questions</title>
    <link>https://community.esri.com/t5/arcgis-field-maps-questions/editcontext-edittype-expression-unable-to-submit/m-p/1598442#M10592</link>
    <description>&lt;P&gt;Turns out I'm getting that error message even without the Arcade, but I can't delete this question.&lt;/P&gt;&lt;P&gt;It seems really intermittent and sometimes submits, sometimes doesn't, even with just 1 simple text field turned on in Field Maps.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2025 10:30:45 GMT</pubDate>
    <dc:creator>DebSF</dc:creator>
    <dc:date>2025-03-24T10:30:45Z</dc:date>
    <item>
      <title>editcontext.editType expression unable to submit</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/editcontext-edittype-expression-unable-to-submit/m-p/1598437#M10590</link>
      <description>&lt;P&gt;I have a point dataset with a related table for multiple field visits. I want to use Arcade to auto-populate the visit date field (in the related table) for each new record. However it's possible that users may want to go back into a record at a later date and make an edit. This updates the visit date to today's date, which I don't want.&lt;/P&gt;&lt;P&gt;To get around this I put in the following Arcade code. This works great for going in and editing an existing record (i.e. it stops the visit date from being changed), but when I try and create a new record, the visit date populates with today's date but when I try and submit I get an error message "Unable to submit. 1 or more attributes failed".&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;LI-CODE lang="c"&gt;// If the visit feature is being created, fill in the date with today's date
if ($editcontext.editType == "INSERT") {
   var currentdate = Now()

   return currentdate
// If it already exists, return the date that was previously filled in
} else {
  return $originalFeature.Date_Visit;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me figure out the issue please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 09:50:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/editcontext-edittype-expression-unable-to-submit/m-p/1598437#M10590</guid>
      <dc:creator>DebSF</dc:creator>
      <dc:date>2025-03-24T09:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: editcontext.editType expression unable to submit</title>
      <link>https://community.esri.com/t5/arcgis-field-maps-questions/editcontext-edittype-expression-unable-to-submit/m-p/1598442#M10592</link>
      <description>&lt;P&gt;Turns out I'm getting that error message even without the Arcade, but I can't delete this question.&lt;/P&gt;&lt;P&gt;It seems really intermittent and sometimes submits, sometimes doesn't, even with just 1 simple text field turned on in Field Maps.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2025 10:30:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-field-maps-questions/editcontext-edittype-expression-unable-to-submit/m-p/1598442#M10592</guid>
      <dc:creator>DebSF</dc:creator>
      <dc:date>2025-03-24T10:30:45Z</dc:date>
    </item>
  </channel>
</rss>

