<?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: Constraint Based on Value in Another Field from a Previous Repeat in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1140102#M40246</link>
    <description>&lt;P&gt;For my gap if you are going down the line I just check max().&amp;nbsp; No need to go to the last repeat since the max is always in order.&lt;/P&gt;&lt;P&gt;I have a full Gap form that we use at the BLM.&amp;nbsp; I cannot post it but if you are in a related industry contact me and I can give you a copy.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2022 22:22:55 GMT</pubDate>
    <dc:creator>DougBrowning</dc:creator>
    <dc:date>2022-02-02T22:22:55Z</dc:date>
    <item>
      <title>Constraint Based on Value in Another Field from a Previous Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1140096#M40245</link>
      <description>&lt;P&gt;I am trying to add a constraint to a field based on the value from another field from a previous repeat.&amp;nbsp; I have more or less figured this out using the position(..) function coupled with the indexed-repeat() function.&amp;nbsp; The problem is that it doesn't work for the first record (where previous value = null), unless I ask the user to enter a 0 for the first record.&amp;nbsp; But ultimately I don't want that field to be changed intentionally in the case of the first record or unintentionally for subsequent records (I'll eventually figure out how to have that value displayed but not alterable, which is another issue altogether).&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried to create a component of the constraint using ISNULL (e.g. ${start_gap}&amp;lt;=9980 and (${start_gap}&amp;gt; ${prev_end_gap} or ISNULL(${prev_end_gap}))).&amp;nbsp; But that did not solve the problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Help with this is much appreciated.&lt;/P&gt;&lt;P&gt;John Ragosta&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 22:11:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1140096#M40245</guid>
      <dc:creator>JohnRagosta</dc:creator>
      <dc:date>2022-02-02T22:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint Based on Value in Another Field from a Previous Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1140102#M40246</link>
      <description>&lt;P&gt;For my gap if you are going down the line I just check max().&amp;nbsp; No need to go to the last repeat since the max is always in order.&lt;/P&gt;&lt;P&gt;I have a full Gap form that we use at the BLM.&amp;nbsp; I cannot post it but if you are in a related industry contact me and I can give you a copy.&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 22:22:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1140102#M40246</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-02-02T22:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint Based on Value in Another Field from a Previous Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141319#M40343</link>
      <description>&lt;P&gt;Thanks, Doug.&amp;nbsp; I reached out to you bc I am in a related industry and would love a copy of that form.&amp;nbsp; I tried the max() function, but I still had an issue with the first record, for which the "prev_end" was still null.&amp;nbsp; But thinking about it more, I'm considering eliminating the repeat and just having all of the start and ends on the same form.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 19:02:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141319#M40343</guid>
      <dc:creator>JohnRagosta</dc:creator>
      <dc:date>2022-02-07T19:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint Based on Value in Another Field from a Previous Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141341#M40349</link>
      <description>&lt;P&gt;Well we show them the last gap since it is not automatic that the end will be the new start.&amp;nbsp; We check against the last to make sure the new start is more than 2 cm past the last one.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DougBrowning_0-1644264700910.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/33291i8F90FF87373AC5E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DougBrowning_0-1644264700910.png" alt="DougBrowning_0-1644264700910.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your case for the first one a if should do it.&amp;nbsp; if(position(..) = 1, 0, max(gapend))&lt;/P&gt;&lt;P&gt;If you dont use a repeat then how can you vary how many gaps there might be?&amp;nbsp; Maybe you do it different but ours can vary from no gaps to a whole bunch.&lt;/P&gt;&lt;P&gt;I sent your info along and you should get the forms soon.&amp;nbsp; thanks&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 20:14:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141341#M40349</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-02-07T20:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint Based on Value in Another Field from a Previous Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141388#M40354</link>
      <description>&lt;P&gt;great question.&amp;nbsp; For now (or at least until I can code a better solution), I am just adding start_gap2, start_gap3, until I've reached a number beyond what we might expect (10 gaps along a 1,000 cm line?).&amp;nbsp;&lt;/P&gt;&lt;P&gt;That said, I can vary the number of gaps that show on the tool by putting some constraints and relevants to reveal the next entry field (or not). The end_gap of the previous record must be smaller than the next start_gap. After entering an end_gap, a new start_gap (start_gap&lt;EM&gt;n)&lt;/EM&gt; will appear unless the "relevant" condition for start_gap&lt;EM&gt;n&lt;/EM&gt;&amp;nbsp;is ${end_gap} &amp;lt;= 9980 is not met.&amp;nbsp; (The 9980 represents 20 cm prior to the end of the line; 20 cm being the minimum gap size.)&amp;nbsp; But the last gap may come well before that in which case the user will leave start_gap&lt;EM&gt;n &lt;/EM&gt;blank.&amp;nbsp; Usign the repeats, I was able to get the Previous End Gap to display, but (back to the original problem) the first value was Null and that was violating my constraint on the start_gap:&amp;nbsp;${start_gap}&amp;lt;=9980 and (${start_gap}&amp;gt; ${prev_end_gap} or ISNULL(${prev_end_gap}).&amp;nbsp; The ISNULL didn't work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I see your additional suggestion.&amp;nbsp; I'll give that a try.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 21:43:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141388#M40354</guid>
      <dc:creator>JohnRagosta</dc:creator>
      <dc:date>2022-02-07T21:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Constraint Based on Value in Another Field from a Previous Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141406#M40356</link>
      <description>&lt;P&gt;Well at this point now that I know we use the same method I will just give you all the forms.&amp;nbsp; We have all 9 from the protocol.&amp;nbsp; Sent you a pm.&amp;nbsp; thanks&lt;/P&gt;</description>
      <pubDate>Mon, 07 Feb 2022 22:15:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/constraint-based-on-value-in-another-field-from-a/m-p/1141406#M40356</guid>
      <dc:creator>DougBrowning</dc:creator>
      <dc:date>2022-02-07T22:15:44Z</dc:date>
    </item>
  </channel>
</rss>

