<?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 Multiplication with a calculation in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/multiplication-with-a-calculation/m-p/1607365#M62178</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I'm doing calculations in a Repeat.&amp;nbsp; &amp;nbsp;The CrackLength calculation works fine.&amp;nbsp; The SpallArea doesn't.&amp;nbsp; I'm sure it has something to do with the syntax of the calculation for the hidden field SpallArea.&amp;nbsp; What I need is the product of the Length times the Width for areas of spalling, i.e., SpallArea:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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(${CrackLength})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TotalArea&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total Area of Spalling&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum(${&lt;STRONG&gt;SpallArea&lt;/STRONG&gt;})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end group&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The repeat looks something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Width&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Width&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;hidden&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp;SpallArea&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Calculation: if(selected($(DamageType),'spalling') and selected(${Recommendation},'Repair'), ${&lt;STRONG&gt;Length*Width&lt;/STRONG&gt;}, 0)&amp;nbsp; &amp;nbsp;bind::type decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end group&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end repeat&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Apr 2025 17:21:02 GMT</pubDate>
    <dc:creator>Phein62</dc:creator>
    <dc:date>2025-04-18T17:21:02Z</dc:date>
    <item>
      <title>Multiplication with a calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/multiplication-with-a-calculation/m-p/1607365#M62178</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'm doing calculations in a Repeat.&amp;nbsp; &amp;nbsp;The CrackLength calculation works fine.&amp;nbsp; The SpallArea doesn't.&amp;nbsp; I'm sure it has something to do with the syntax of the calculation for the hidden field SpallArea.&amp;nbsp; What I need is the product of the Length times the Width for areas of spalling, i.e., SpallArea:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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(${CrackLength})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TotalArea&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Total Area of Spalling&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; sum(${&lt;STRONG&gt;SpallArea&lt;/STRONG&gt;})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end group&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The repeat looks something like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Width&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Width&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&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;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;hidden&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;STRONG&gt;&amp;nbsp;SpallArea&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Calculation: if(selected($(DamageType),'spalling') and selected(${Recommendation},'Repair'), ${&lt;STRONG&gt;Length*Width&lt;/STRONG&gt;}, 0)&amp;nbsp; &amp;nbsp;bind::type decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end group&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;end repeat&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2025 17:21:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/multiplication-with-a-calculation/m-p/1607365#M62178</guid>
      <dc:creator>Phein62</dc:creator>
      <dc:date>2025-04-18T17:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplication with a calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/multiplication-with-a-calculation/m-p/1607381#M62179</link>
      <description>&lt;P&gt;A colleague stopped by and was looking over my shoulder, and said I should create another hidden field, call it RawSpallArea, add a calculation for that field ${Length}*${Width}, and then reference that in SpallArea like so:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Calculation: if(selected($(DamageType),'spalling') and selected(${Recommendation},'Repair'), ${&lt;/SPAN&gt;&lt;STRONG&gt;RAwSpallArea&lt;/STRONG&gt;&lt;SPAN&gt;}, 0)&amp;nbsp; &amp;nbsp;bind::type decimal&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm not sure how elegant that is, but it works.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Apr 2025 18:01:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/multiplication-with-a-calculation/m-p/1607381#M62179</guid>
      <dc:creator>Phein62</dc:creator>
      <dc:date>2025-04-18T18:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Multiplication with a calculation</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/multiplication-with-a-calculation/m-p/1607522#M62183</link>
      <description>&lt;P&gt;${length*width} is trying to reference a field called 'length*width' that doesn't exist. The correct format is ${length} * ${width}. This finds two fields 'length' and 'width' and multiplies them using *.&lt;/P&gt;&lt;P&gt;You should not need to use an 'if' statement within the calculation. You calculation is basic. It should just be ${length}*${width}.&lt;/P&gt;&lt;P&gt;Move the if statement to the &lt;STRONG&gt;relevant&lt;/STRONG&gt; column. End result is:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Users select type&lt;/LI&gt;&lt;LI&gt;Users enter length&lt;/LI&gt;&lt;LI&gt;Users enter width (relevant to a type requiring width)&lt;/LI&gt;&lt;LI&gt;Calculations (relevant to type using if statements, basic calculations)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Using relevant means your users will only see the questions they need. The calculations will only trigger when relevant, and you don't need to combine the if statements within the calculation itself.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/using-formulas-in-survey123/ba-p/898169" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-blog/using-formulas-in-survey123/ba-p/898169&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-hidden-relevant-and/ba-p/1165842" target="_blank"&gt;https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-hidden-relevant-and/ba-p/1165842&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 19 Apr 2025 23:53:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/multiplication-with-a-calculation/m-p/1607522#M62183</guid>
      <dc:creator>ChristopherCounsell</dc:creator>
      <dc:date>2025-04-19T23:53:52Z</dc:date>
    </item>
  </channel>
</rss>

