<?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 Feature Reports orderByFields syntax in ArcGIS Survey123 Questions</title>
    <link>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1064602#M35044</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm having a bit of trouble with the syntax for the&amp;nbsp;&lt;SPAN&gt;orderByFields parameter in my report template. In the &lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm" target="_self"&gt;help section&lt;/A&gt; it provides the example&amp;nbsp;${defects | orderByFields:"state_name ASC, pop2000 DESC"}. In my example I'm applying this to a nested repeat and have tried the following;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;${#MaintenanceDetails}${#Notifications}${Notifications|orderByFields:"NotificationBoQRef DESC"}${NotificationBoQRef}${/}${/}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This didn't work and I just end up with an unsorted list of repeats each with [object Object] preceding them. I then tried the alternative below with the orderByFields parameter added to the repeat placeholder for the start of the repeat;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;${#MaintenanceDetails}${#Notifications|orderByFields:"NotificationBoQRef DESC"}${NotificationBoQRef}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In this version the sorting works but I end up with my repeat values being duplicated multiple times. You can see in the image below how the values D6 and D4 appear again at the bottom of the list. Can someone please provide some guidance on the syntax or confirm whether this is a bug associated with nested repeats?&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;I also need to combine the&amp;nbsp;orderByFields parameter with some if statements to limit the repeats pulled into the report and wondered whether the "where" clause utilised in &lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm#ESRI_SECTION1_34D03ABEE83B49CE82B0B1D8FDCE04D1" target="_self"&gt;summary reports&lt;/A&gt;&amp;nbsp;and demonstrated by Ismael &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/feature-reports/td-p/824484" target="_self"&gt;here&lt;/A&gt; can be used within the regular reports? It did seem to work when I tried it but the orderbyFields parameter still wouldn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnthonyJones5_0-1622725029165.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15050iCEB5A5F771C0EF43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnthonyJones5_0-1622725029165.png" alt="AnthonyJones5_0-1622725029165.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2929"&gt;@IsmaelChivite&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jun 2021 13:09:30 GMT</pubDate>
    <dc:creator>AnthonyJonesRSK</dc:creator>
    <dc:date>2021-06-03T13:09:30Z</dc:date>
    <item>
      <title>Feature Reports orderByFields syntax</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1064602#M35044</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm having a bit of trouble with the syntax for the&amp;nbsp;&lt;SPAN&gt;orderByFields parameter in my report template. In the &lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereporttemplates.htm" target="_self"&gt;help section&lt;/A&gt; it provides the example&amp;nbsp;${defects | orderByFields:"state_name ASC, pop2000 DESC"}. In my example I'm applying this to a nested repeat and have tried the following;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;${#MaintenanceDetails}${#Notifications}${Notifications|orderByFields:"NotificationBoQRef DESC"}${NotificationBoQRef}${/}${/}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This didn't work and I just end up with an unsorted list of repeats each with [object Object] preceding them. I then tried the alternative below with the orderByFields parameter added to the repeat placeholder for the start of the repeat;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;${#MaintenanceDetails}${#Notifications|orderByFields:"NotificationBoQRef DESC"}${NotificationBoQRef}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In this version the sorting works but I end up with my repeat values being duplicated multiple times. You can see in the image below how the values D6 and D4 appear again at the bottom of the list. Can someone please provide some guidance on the syntax or confirm whether this is a bug associated with nested repeats?&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;SPAN&gt;I also need to combine the&amp;nbsp;orderByFields parameter with some if statements to limit the repeats pulled into the report and wondered whether the "where" clause utilised in &lt;A href="https://doc.arcgis.com/en/survey123/browser/analyze-results/featurereportqueries.htm#ESRI_SECTION1_34D03ABEE83B49CE82B0B1D8FDCE04D1" target="_self"&gt;summary reports&lt;/A&gt;&amp;nbsp;and demonstrated by Ismael &lt;A href="https://community.esri.com/t5/arcgis-survey123-questions/feature-reports/td-p/824484" target="_self"&gt;here&lt;/A&gt; can be used within the regular reports? It did seem to work when I tried it but the orderbyFields parameter still wouldn't work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Anthony&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AnthonyJones5_0-1622725029165.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/15050iCEB5A5F771C0EF43/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AnthonyJones5_0-1622725029165.png" alt="AnthonyJones5_0-1622725029165.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2929"&gt;@IsmaelChivite&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1064602#M35044</guid>
      <dc:creator>AnthonyJonesRSK</dc:creator>
      <dc:date>2021-06-03T13:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Reports orderByFields syntax</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1065027#M35066</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/390487"&gt;@AnthonyJonesRSK&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Is it possible to share the xlsx file and report template so we can reproduce this issue quicker? You can send them to my email &lt;A href="mailto:zliu@esri.com" target="_blank"&gt;zliu@esri.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jody Zheng Liu&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 10:28:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1065027#M35066</guid>
      <dc:creator>JodyZhengLiu</dc:creator>
      <dc:date>2021-06-04T10:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Reports orderByFields syntax</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1073540#M35601</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/283130"&gt;@JodyZhengLiu&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2929"&gt;@IsmaelChivite&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1213"&gt;@JamesTedrick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are also experiencing the same behaviour with orderbyfields within a nested repeat. Grandparent &amp;gt; Parent &amp;gt; Child&lt;/P&gt;&lt;P&gt;We have tested numerous iterations and what seems to be happening as soon as you apply an orderbyfields to the nested repeat table (Child), it returns all records from the Child associated through the parent but at the Grand Parent level. i.e. not filtering to the relevant Parent. Thus in the FRT report the parent shows all child records regardless of relationship to the parent.&lt;/P&gt;&lt;P&gt;Data example here&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Site (Grandparent) - siteid: AB1&lt;UL&gt;&lt;LI&gt;Strata (Parent) - strata: T&lt;UL&gt;&lt;LI&gt;Specie (Child) specie: acacia&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: xyz&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Strata (Parent) - strata: G&lt;UL&gt;&lt;LI&gt;Specie (Child) specie: abc&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: def&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The FRT Report with orderbyfield on species does this (note sorted)&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Site (Grandparent) - siteid: AB1&lt;UL&gt;&lt;LI&gt;Strata (Parent) - strata: T&lt;UL&gt;&lt;LI&gt;Specie (Child) specie: abc&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: acacia&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: def&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: xyz&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;Strata (Parent) - strata: G&lt;UL&gt;&lt;LI&gt;Specie (Child) specie: abc&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: acacia&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: def&lt;/LI&gt;&lt;LI&gt;Specie (Child) specie: xyz&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;We think this is a bug within the FRT and order by in the nested repeats&lt;/P&gt;&lt;P&gt;Regards&lt;BR /&gt;Nick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jun 2021 00:57:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1073540#M35601</guid>
      <dc:creator>NicholasMoore</dc:creator>
      <dc:date>2021-06-29T00:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Feature Reports orderByFields syntax</title>
      <link>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1207245#M44524</link>
      <description>&lt;P&gt;Having the same issue and know that it could be a quick fix for my issue as well.&lt;/P&gt;&lt;P&gt;Thanks so much&amp;nbsp;&lt;A href="mailto:zliu@esri.com" target="_blank" rel="nofollow noopener noreferrer"&gt;zliu@esri.com&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 29 Aug 2022 15:05:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-survey123-questions/feature-reports-orderbyfields-syntax/m-p/1207245#M44524</guid>
      <dc:creator>survey123_solutions</dc:creator>
      <dc:date>2022-08-29T15:05:29Z</dc:date>
    </item>
  </channel>
</rss>

