<?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: How to use operators inside of aggregate functions? [i.e count(${size}&amp;lt;25)] in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1394824#M55434</link>
    <description>&lt;P&gt;Maybe I am misreading, but you are saying the surveyor would need to separate entries above and below threshold into two separate fields?&lt;/P&gt;&lt;P&gt;Ran into some bumps trying to get concat to work, error 'couldn't understand the expression starting at this point...' I put concat(${dbh_lt25},'&amp;lt;br&amp;gt;') in the calculation column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I partially figured it out, by using hidden integer columns instead of calculate columns. The calculate seemed to be a string instead of number.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Mar 2024 19:23:47 GMT</pubDate>
    <dc:creator>PBCartoTech</dc:creator>
    <dc:date>2024-03-13T19:23:47Z</dc:date>
    <item>
      <title>How to use operators inside of aggregate functions? [i.e count(${size}&lt;25)]</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1394327#M55418</link>
      <description>&lt;P&gt;I'd like to show a count from a repeat collection group of tree diameter values. As surveyors are entering the diameter values into the repeat group, a box will show the count of tree diameters above 25 diameter, and a separate box will show the count of tree diameters below 25 diameter. I would like to do the same with sum, and get a sum of all tree diameters above 25 diameter, and below 25 diameter.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the calculation attribute I tried count(${size}&amp;lt;25), but I get an error that says 'type mismatch'&lt;/P&gt;&lt;P&gt;I also tried&amp;nbsp;if(${dbh}&amp;lt;25,count(${dbh}),0), with no error, but the result is always 0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this possible? If so, how? If it isn't I am open to ideas. My back up idea is to have the surveyor enter tree diameters into two separate repeats, a repeat for above 25 diameter and under 25 diameter.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2024 19:27:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1394327#M55418</guid>
      <dc:creator>PBCartoTech</dc:creator>
      <dc:date>2024-03-11T19:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to use operators inside of aggregate functions? [i.e count(${size}&lt;25)]</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1394677#M55426</link>
      <description>&lt;P&gt;In the repeat, I'd have two calculates. One for diameters below threshold (e.g., &lt;STRONG&gt;${dbh_lt25}&lt;/STRONG&gt;), and one for above (e.g., &lt;STRONG&gt;${dbh_gt25}&lt;/STRONG&gt;).&amp;nbsp; Then outside the repeat, use sum() on the two separate calculates. E.g., &lt;STRONG&gt;sum(${dbh_lt25})&lt;/STRONG&gt; and &lt;STRONG&gt;sum(${dbh_gt25})&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For the list, do you mean a literal list? In that case, you will want two more calculates in the repeat. One for less than threshold and one for greater than threshold. Both will have a similar format: &lt;STRONG&gt;concat(${dbh_lt25},'&amp;lt;br&amp;gt;') &lt;/STRONG&gt;and &lt;STRONG&gt;concat(${dbh_gt25},'&amp;lt;br&amp;gt;')&lt;/STRONG&gt;. Then, outside the repeat, you just sum() those up and you will have a list.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/EM&gt;&lt;EM&gt; When using SUM() like this to create a list, be sure to either set the fields to null&lt;/EM&gt;&lt;EM&gt; or greatly increase the field length. If you don't, the fields will default to 255 character length, and exceeding that will return an annoyingly vague error.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Mar 2024 15:03:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1394677#M55426</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-03-12T15:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to use operators inside of aggregate functions? [i.e count(${size}&lt;25)]</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1394824#M55434</link>
      <description>&lt;P&gt;Maybe I am misreading, but you are saying the surveyor would need to separate entries above and below threshold into two separate fields?&lt;/P&gt;&lt;P&gt;Ran into some bumps trying to get concat to work, error 'couldn't understand the expression starting at this point...' I put concat(${dbh_lt25},'&amp;lt;br&amp;gt;') in the calculation column&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think I partially figured it out, by using hidden integer columns instead of calculate columns. The calculate seemed to be a string instead of number.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 19:23:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1394824#M55434</guid>
      <dc:creator>PBCartoTech</dc:creator>
      <dc:date>2024-03-13T19:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use operators inside of aggregate functions? [i.e count(${size}&lt;25)]</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1395518#M55454</link>
      <description>&lt;P&gt;Do you have ${dbh_lt25} as a field within your survey?&lt;/P&gt;&lt;P&gt;I copy-pasted that syntax from a survey that I am doing this same operation in.&lt;/P&gt;&lt;P&gt;Check this out:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_0-1710356113971.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/97923iB661B7B04B09848B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_0-1710356113971.png" alt="abureaux_0-1710356113971.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In this survey, I have several calculates set up like this to build out a "summary" list. The syntax should be correct.&lt;/P&gt;&lt;P&gt;This is the resulting table:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abureaux_1-1710356286238.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/97926i4916F60A1691C9DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abureaux_1-1710356286238.png" alt="abureaux_1-1710356286238.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 18:59:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/how-to-use-operators-inside-of-aggregate-functions/m-p/1395518#M55454</guid>
      <dc:creator>abureaux</dc:creator>
      <dc:date>2024-03-13T18:59:02Z</dc:date>
    </item>
  </channel>
</rss>

