<?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: Lock a calculated field after first submission, so it doesn't change with edits? in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1505849#M57921</link>
    <description>&lt;P&gt;I think the issue here, is that we want it to change with each selection, i.e. our default is an unmarked loggerhead false crawl, but if we change species or crawl type, it needs to change the ID with each of those clicks... I've tried a few other things, it's still recalculating the nest ID with most updated totals every time an entry is opened from the inbox. I tried adding a different field for marked totals and changing the nest ID to concat marked totals with species. Is there something with the once() function that would work or the t = now?&lt;/P&gt;</description>
    <pubDate>Tue, 16 Jul 2024 16:08:01 GMT</pubDate>
    <dc:creator>RylieMacdonald</dc:creator>
    <dc:date>2024-07-16T16:08:01Z</dc:date>
    <item>
      <title>Lock a calculated field after first submission, so it doesn't change with edits?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1502702#M57777</link>
      <description>&lt;P&gt;Hey all, I developed a Survey123 app to do the sea turtle nesting survey for the beach I work on, and everything was running smoothly until I made a recent update.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are a high density nesting beach, so we mark a subsample of nests (i.e. every 15th loggerhead nest). The way our survey previously worked, is that it would calculate the nest total by 15 to create a nest ID. So Cc1 is really our 15th nest, Cc2 is 30, and so on. We adjust the marking scheme throughout the season based on activity, and changed the calculation for the nest ID field because at that point we had already marked 115 nests, and changing the scheme would throw off nest IDs and calculations. Instead, we changed the calculation to just add 1 to the number of marked nests when you get to the 15th nest of the day to keep the nest IDs sequential.&lt;/P&gt;&lt;P&gt;The issue I have now, is that the nest ID field want&amp;nbsp; s to recalculate every time I make an edit to a nest. We record fates such as predations, hatches, etc on existing marked nests from the inbox, but when adding these, it tried to update the nest ID. i.e.... CC5 hatched, now we have 119 marked, and when trying to update the hatch field on CC5 it tried to change it to CC120. Is there a way to lock this field so it's only calculated on the first entry?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some things I've tried:&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the once function, but it may not be the correct syntax.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The read_only would not do the correct calculation&lt;/P&gt;&lt;P&gt;I tried all the different calculation modes for the "bind::esri:parameters" column and those did not work either.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If anyone has any advice I would greatly appreciate it! I can attach my XLS file if needed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2024 19:26:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1502702#M57777</guid>
      <dc:creator>RylieMacdonald</dc:creator>
      <dc:date>2024-07-08T19:26:43Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a calculated field after first submission, so it doesn't change with edits?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1503711#M57826</link>
      <description>&lt;P&gt;Have you tried &lt;EM&gt;calculationMode=whenEmpty&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 17:52:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1503711#M57826</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-07-10T17:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a calculated field after first submission, so it doesn't change with edits?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1503713#M57827</link>
      <description>&lt;P&gt;May be worth adding your XLSX file.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 17:53:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1503713#M57827</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-07-10T17:53:54Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a calculated field after first submission, so it doesn't change with edits?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1504379#M57854</link>
      <description>&lt;P&gt;I attached my XLS form. I just tried whenEmpty, but it's still doing the same thing &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 18:31:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1504379#M57854</guid>
      <dc:creator>RylieMacdonald</dc:creator>
      <dc:date>2024-07-11T18:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a calculated field after first submission, so it doesn't change with edits?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1504407#M57856</link>
      <description>&lt;P&gt;This one?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_1-1720723059827.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109559i6E41EA176389EA2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_1-1720723059827.png" alt="abureaux_1-1720723059827.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;whenEmpty won't work for that. Your IF() statement is based on ${marked} and immediately results in either A or B. If you don't need to retroactively go back and change something from A to B, then a simple nested IF() statement will do the trick:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(selected(${marking},'marked'), &lt;FONT color="#FF0000"&gt;'A'&lt;/FONT&gt;,if(selected(${marking},'unmarked'),&lt;FONT color="#0000FF"&gt;'B'&lt;/FONT&gt;,&lt;FONT color="#00FF00"&gt;''&lt;/FONT&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(selected(${marking},'marked'), &lt;FONT color="#FF0000"&gt;concat(${species}, pulldata("@layer", "getValue", "attributes.MarkedCountForSpecies", concat(concat('URL/FeatureServer/0', '?outStatistics=[{"statisticType": "count", "onStatisticField": "OBJECTID", "outStatisticFieldName": "MarkedCountForSpecies"}]')&lt;/FONT&gt;&lt;FONT color="#000000"&gt;,if(selected(${marking},'unmarked'),&lt;/FONT&gt;&lt;FONT color="#0000FF"&gt;concat("&amp;amp;t=", now())), concat("SPECIES = '", ${species}, "' AND MARKING = 'marked'")) +1), concat(${Marking},'_',${species},'_',${Crawl_Type})&lt;/FONT&gt;,&lt;FONT color="#00FF00"&gt;''&lt;/FONT&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This way, the calculate is empty until a selection is made.&lt;/P&gt;&lt;P&gt;EDIT: Also, notes aren't the best thing to use for... most tasks that aren't simply displaying text. If you want to show the Nest ID &lt;EM&gt;and&lt;/EM&gt; do so in a single step, I'd recommend changing to a text field set to read only. E.g.,&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_5-1720724471619.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109569i57742D57DE5F3951/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_5-1720724471619.png" alt="abureaux_5-1720724471619.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 19:01:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1504407#M57856</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-07-11T19:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a calculated field after first submission, so it doesn't change with edits?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1505849#M57921</link>
      <description>&lt;P&gt;I think the issue here, is that we want it to change with each selection, i.e. our default is an unmarked loggerhead false crawl, but if we change species or crawl type, it needs to change the ID with each of those clicks... I've tried a few other things, it's still recalculating the nest ID with most updated totals every time an entry is opened from the inbox. I tried adding a different field for marked totals and changing the nest ID to concat marked totals with species. Is there something with the once() function that would work or the t = now?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jul 2024 16:08:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1505849#M57921</guid>
      <dc:creator>RylieMacdonald</dc:creator>
      <dc:date>2024-07-16T16:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Lock a calculated field after first submission, so it doesn't change with edits?</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1506304#M57941</link>
      <description>&lt;P&gt;This is the solution that finally worked for me!:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/editing-from-inbox-can-i-make-some-fields-read/td-p/1045752" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-questions/editing-from-inbox-can-i-make-some-fields-read/td-p/1045752&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jul 2024 19:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/lock-a-calculated-field-after-first-submission-so/m-p/1506304#M57941</guid>
      <dc:creator>RylieMacdonald</dc:creator>
      <dc:date>2024-07-17T19:32:31Z</dc:date>
    </item>
  </channel>
</rss>

