<?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: Arcade: Schema function returns different field order depending on application and data source in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcade-schema-function-returns-different-field/m-p/1536786#M7296</link>
    <description>&lt;P&gt;There are closed bugs and enhancement requests for these quirks&lt;/P&gt;&lt;DIV&gt;&lt;UL&gt;&lt;LI&gt;BUG-000152604: In Map Viewer, the Arcade $feature global variable returns fields alphabetically instead of the default field order it is published as.&lt;UL&gt;&lt;LI&gt;Closed, will not be addressed:&lt;/LI&gt;&lt;LI&gt;Public Explanation: This issue is not addressed at this time as it is a breaking change to existing expressions.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;ENH-000140303: Add a functionality to the map viewer to resort a field list based on the layer field or alphabetical order.&lt;/LI&gt;&lt;LI&gt;BUG-000144733: ArcGIS Online Map Viewer does not honor the field order for a hosted feature service.&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Closed: Known limitation&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Public Explanation: This is currently working as designed in the ArcGIS Online Map Viewer. There is a road map plan to add additional sort options to this field experience to take default order into account.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 10 Sep 2024 12:31:22 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2024-09-10T12:31:22Z</dc:date>
    <item>
      <title>Arcade: Schema function returns different field order depending on application and data source</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-schema-function-returns-different-field/m-p/1529559#M7220</link>
      <description>&lt;P&gt;I can get the fields from a Feature or a FeatureSet using the Schema function and cycling through the fields key&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var output = []
var fields = Schema(item).fields;
for (var f in fields) {
  Push(output, fields[f].name)
}

return { 
  type : 'text', 
  text :Concatenate(output, ', ')
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a Feature, in AGOL, the fields are returned in alphabetical order (with the exception of OBJECTID). In ArcGIS Pro, they are returned in their original order. These two screenshots use the same item from AGOL and the same code in the Arcade element&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_9f6d1c.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113867i4CF4DF36677CEA37/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_9f6d1c.png" alt="Snag_9f6d1c.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_9f910f.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113868iCDCCF30C2DBDBD29/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_9f910f.png" alt="Snag_9f910f.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;For a FeatureSet, the order of the fields depends on how I get that FeatureSet. If I get it from the map using&amp;nbsp; FeatureSetByName, the fields are returned in alphabetical order. If I get it from the Portal using FeatureSetByPortalItem, they are returned in their original order.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snag_ac1633.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/113869iFEE2DAE6866EA89D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Snag_ac1633.png" alt="Snag_ac1633.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Why isn't this consistent?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2024 16:51:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-schema-function-returns-different-field/m-p/1529559#M7220</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-08-29T16:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Schema function returns different field order depending on application and data source</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-schema-function-returns-different-field/m-p/1536786#M7296</link>
      <description>&lt;P&gt;There are closed bugs and enhancement requests for these quirks&lt;/P&gt;&lt;DIV&gt;&lt;UL&gt;&lt;LI&gt;BUG-000152604: In Map Viewer, the Arcade $feature global variable returns fields alphabetically instead of the default field order it is published as.&lt;UL&gt;&lt;LI&gt;Closed, will not be addressed:&lt;/LI&gt;&lt;LI&gt;Public Explanation: This issue is not addressed at this time as it is a breaking change to existing expressions.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;ENH-000140303: Add a functionality to the map viewer to resort a field list based on the layer field or alphabetical order.&lt;/LI&gt;&lt;LI&gt;BUG-000144733: ArcGIS Online Map Viewer does not honor the field order for a hosted feature service.&lt;UL&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Closed: Known limitation&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN class=""&gt;Public Explanation: This is currently working as designed in the ArcGIS Online Map Viewer. There is a road map plan to add additional sort options to this field experience to take default order into account.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 10 Sep 2024 12:31:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-schema-function-returns-different-field/m-p/1536786#M7296</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-09-10T12:31:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade: Schema function returns different field order depending on application and data source</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-schema-function-returns-different-field/m-p/1538057#M7300</link>
      <description>&lt;P&gt;Is there some way for me to be notified if/when&amp;nbsp;&lt;SPAN&gt;ENH-000140303 is implemented?&amp;nbsp; Or subscribe to it, or even just to view it?&amp;nbsp; (Or can I only see enhancement requests submitted by my organisation?)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 22:17:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-schema-function-returns-different-field/m-p/1538057#M7300</guid>
      <dc:creator>NikSandsTP</dc:creator>
      <dc:date>2024-09-12T22:17:13Z</dc:date>
    </item>
  </channel>
</rss>

