<?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: Is there an array function on Survey 123? I'm trying to sort variables from maximum to minimum.  in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/is-there-an-array-function-on-survey-123-i-m/m-p/813520#M13957</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried using a custom JavaScript function, this would be the only way you can currently do this as we do not support sorting variables in an array in the app with any in-built functions. Here is a link to EAC with details about using JS functions in the app, note this is still beta functionality:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://earlyadopter.esri.com/project/article/item.html?cap=e69ef91f45744b98882c651f7b518eb7&amp;amp;arttypeid={5a8e51ed-4a87-43fe-a67d-2b7829af130f}&amp;amp;artid={D2F0ED6D-1ADC-43EF-8A87-FCCF09381DB3}"&gt;https://earlyadopter.esri.com/project/article/item.html?cap=e69ef91f45744b98882c651f7b518eb7&amp;amp;arttypeid={5a8e51ed-4a87-43fe-a67d-2b7829af130f}&amp;amp;artid={D2F0ED6D-1ADC-43EF-8A87-FCCF09381DB3}&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example pulldata() function you could use to get an array of all the values of a field from the repeat and pass it to a JS function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: rgba(27, 31, 35, 0.05);"&gt;pulldata("@javascript", "functions.js", "sumField", ${r1}, "r1_decimal")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: rgba(27, 31, 35, 0.05);"&gt;Phil.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 24 Mar 2019 21:59:24 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2019-03-24T21:59:24Z</dc:date>
    <item>
      <title>Is there an array function on Survey 123? I'm trying to sort variables from maximum to minimum.</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/is-there-an-array-function-on-survey-123-i-m/m-p/813519#M13956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there an array function on Survey 123? I'm trying to sort variables from maximum to minimum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Mar 2019 20:36:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/is-there-an-array-function-on-survey-123-i-m/m-p/813519#M13956</guid>
      <dc:creator>SaadRoustom</dc:creator>
      <dc:date>2019-03-23T20:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Is there an array function on Survey 123? I'm trying to sort variables from maximum to minimum.</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/is-there-an-array-function-on-survey-123-i-m/m-p/813520#M13957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Saad,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried using a custom JavaScript function, this would be the only way you can currently do this as we do not support sorting variables in an array in the app with any in-built functions. Here is a link to EAC with details about using JS functions in the app, note this is still beta functionality:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://earlyadopter.esri.com/project/article/item.html?cap=e69ef91f45744b98882c651f7b518eb7&amp;amp;arttypeid={5a8e51ed-4a87-43fe-a67d-2b7829af130f}&amp;amp;artid={D2F0ED6D-1ADC-43EF-8A87-FCCF09381DB3}"&gt;https://earlyadopter.esri.com/project/article/item.html?cap=e69ef91f45744b98882c651f7b518eb7&amp;amp;arttypeid={5a8e51ed-4a87-43fe-a67d-2b7829af130f}&amp;amp;artid={D2F0ED6D-1ADC-43EF-8A87-FCCF09381DB3}&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example pulldata() function you could use to get an array of all the values of a field from the repeat and pass it to a JS function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: rgba(27, 31, 35, 0.05);"&gt;pulldata("@javascript", "functions.js", "sumField", ${r1}, "r1_decimal")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #24292e; background-color: rgba(27, 31, 35, 0.05);"&gt;Phil.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 24 Mar 2019 21:59:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/is-there-an-array-function-on-survey-123-i-m/m-p/813520#M13957</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-03-24T21:59:24Z</dc:date>
    </item>
  </channel>
</rss>

