<?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 Complex calculations in a Repeat in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606606#M62144</link>
    <description>&lt;P&gt;I'm using Survey123 Connect, v. 3.22.53.&amp;nbsp; I have repeats in my survey -- based on the Advanced Template -- where I collect information on concrete surface abnormalities, including type (cracking, spalling, etc), length in inches, and recommended action (monitor, repair, no action).&lt;/P&gt;&lt;P&gt;I can get the sum of all the lengths for each entry in this repeat by creating a group outside of the repeat that references named fields from within the repeat, e.g.:&lt;/P&gt;&lt;P&gt;begin group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Summary&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Summary of Cracks&lt;/P&gt;&lt;P&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TotalLength&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total Length of Cracks&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sum(${Length})&lt;/P&gt;&lt;P&gt;end group&lt;/P&gt;&lt;P&gt;The repeat looks something like:&lt;/P&gt;&lt;P&gt;begin repeat&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Surface&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Surface Condition&lt;/P&gt;&lt;P&gt;begin group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Surface1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&amp;gt;&lt;/P&gt;&lt;P&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Length&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Length&lt;/P&gt;&lt;P&gt;select_one&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DamageType&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[NOTE:&amp;nbsp; This would be cracking, spalling, etc.]&lt;/P&gt;&lt;P&gt;select_one&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Recommendation&amp;nbsp; &amp;nbsp; Recommendation&amp;nbsp; &amp;nbsp;[NOTE: This would be Monitor, Repair, No Action]&lt;/P&gt;&lt;P&gt;end group&lt;/P&gt;&lt;P&gt;end repeat&lt;/P&gt;&lt;P&gt;What I need to be able to do is get the sum of cracks based on which type of abnormality it is, that is, I only want to include the length of cracks, not the length of spalling, and only those recommended for repairs, not the ones where the recommendation is monitor or no action.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Apr 2025 18:10:14 GMT</pubDate>
    <dc:creator>Phein62</dc:creator>
    <dc:date>2025-04-16T18:10:14Z</dc:date>
    <item>
      <title>Complex calculations in a Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606606#M62144</link>
      <description>&lt;P&gt;I'm using Survey123 Connect, v. 3.22.53.&amp;nbsp; I have repeats in my survey -- based on the Advanced Template -- where I collect information on concrete surface abnormalities, including type (cracking, spalling, etc), length in inches, and recommended action (monitor, repair, no action).&lt;/P&gt;&lt;P&gt;I can get the sum of all the lengths for each entry in this repeat by creating a group outside of the repeat that references named fields from within the repeat, e.g.:&lt;/P&gt;&lt;P&gt;begin group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Summary&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Summary of Cracks&lt;/P&gt;&lt;P&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TotalLength&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total Length of Cracks&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sum(${Length})&lt;/P&gt;&lt;P&gt;end group&lt;/P&gt;&lt;P&gt;The repeat looks something like:&lt;/P&gt;&lt;P&gt;begin repeat&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Surface&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Surface Condition&lt;/P&gt;&lt;P&gt;begin group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Surface1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&amp;gt;&lt;/P&gt;&lt;P&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Length&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Length&lt;/P&gt;&lt;P&gt;select_one&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DamageType&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[NOTE:&amp;nbsp; This would be cracking, spalling, etc.]&lt;/P&gt;&lt;P&gt;select_one&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Recommendation&amp;nbsp; &amp;nbsp; Recommendation&amp;nbsp; &amp;nbsp;[NOTE: This would be Monitor, Repair, No Action]&lt;/P&gt;&lt;P&gt;end group&lt;/P&gt;&lt;P&gt;end repeat&lt;/P&gt;&lt;P&gt;What I need to be able to do is get the sum of cracks based on which type of abnormality it is, that is, I only want to include the length of cracks, not the length of spalling, and only those recommended for repairs, not the ones where the recommendation is monitor or no action.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 18:10:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606606#M62144</guid>
      <dc:creator>Phein62</dc:creator>
      <dc:date>2025-04-16T18:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: Complex calculations in a Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606628#M62147</link>
      <description>&lt;P&gt;You can achieve this by creating a hidden field inside the repeat that captures the length only for cracking and only when repairs are recommended. Then sum that field outside the repeat.&lt;/P&gt;&lt;P&gt;begin group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Summary&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Summary of Cracks&lt;/P&gt;&lt;P&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TotalLength&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total Length of Cracks&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;FONT color="#FF0000"&gt;sum(${CrackLength})&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;end group&lt;/P&gt;&lt;P&gt;The repeat looks something like:&lt;/P&gt;&lt;P&gt;begin repeat&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Surface&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Surface Condition&lt;/P&gt;&lt;P&gt;begin group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Surface1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/&amp;gt;&lt;/P&gt;&lt;P&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Length&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Length&lt;/P&gt;&lt;P&gt;select_one&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DamageType&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Type&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[NOTE:&amp;nbsp; This would be cracking, spalling, etc.]&lt;/P&gt;&lt;P&gt;select_one&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Recommendation&amp;nbsp; &amp;nbsp; Recommendation&amp;nbsp; &amp;nbsp;[NOTE: This would be Monitor, Repair, No Action]&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;hidden&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;CrackLength&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Calculation: if(selected(${DamageType},'cracking') and selected(${Recommendation},'Repair'),${Length},0)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;bind::type: decimal&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;end group&lt;/P&gt;&lt;P&gt;end repeat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 18:59:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606628#M62147</guid>
      <dc:creator>Neal_t_k</dc:creator>
      <dc:date>2025-04-16T18:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Complex calculations in a Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606653#M62149</link>
      <description>&lt;P&gt;Thank you very much!&amp;nbsp; &amp;nbsp;Worked like a charm, and I can see other uses for that syntax.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 19:29:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606653#M62149</guid>
      <dc:creator>Phein62</dc:creator>
      <dc:date>2025-04-16T19:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Complex calculations in a Repeat</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606741#M62156</link>
      <description>Thank you so very much! I'm going to print this and pin it to my bulletin board.&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Apr 2025 23:36:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/complex-calculations-in-a-repeat/m-p/1606741#M62156</guid>
      <dc:creator>Phein62</dc:creator>
      <dc:date>2025-04-16T23:36:35Z</dc:date>
    </item>
  </channel>
</rss>

