<?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 ARCADE Groups BY Function in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-groups-by-function/m-p/1254390#M50096</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In AGOL, I want to return a result with a loop (contextual window) depending on the value present in a field. I'm a beginner with ARCADE and I can't do what I want&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;My ARCADE expression is:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;// Acess 'Groundwater Levels Monthly Mean' table as a FeatureSet&lt;BR /&gt;var portal = Portal("&lt;A href="https://www.arcgis.com" target="_blank" rel="noopener"&gt;https://www.arcgis.com&lt;/A&gt;")&lt;BR /&gt;var waterLevels = FeatureSetByPortalItem(portal,&lt;BR /&gt;"2700a42fce724cd588477fd60f1d84c1", 1, ['Commande', 'Etat_Pose',&lt;BR /&gt;'Ref_Gravee', 'Num_poteau', 'Ligne','Texte', 'Altitude', 'Longueur','Tps_pedestre', 'Altitude', 'Sens'])&lt;/P&gt;&lt;P&gt;// Filter related features by using a common attribute&lt;BR /&gt;var NUM_ENTITE = $feature["NUM_ENTITE"]&lt;BR /&gt;var filterStatement = 'Num_poteau = @NUM_ENTITE'&lt;/P&gt;&lt;P&gt;// Related features as a variable&lt;BR /&gt;var relatedData = Filter(waterLevels, filterStatement)&lt;BR /&gt;&lt;BR /&gt;// Sort related features by oldest to newest&lt;BR /&gt;var relatedDataSorted = OrderBy(relatedData, 'Ref_Gravee')&lt;/P&gt;&lt;P&gt;// Build the pop-up string by iterating through all related features&lt;BR /&gt;var popupString = ''&lt;BR /&gt;for (var f in relatedDataSorted){&lt;BR /&gt;&lt;BR /&gt;popupString += f.Ref_Gravee + TextFormatting.NewLine +&lt;BR /&gt;&lt;BR /&gt;f.Commande + f.Texte + f.Longueur + TextFormatting.NewLine&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;DefaultValue(popupString, 'No measurements to show')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My result :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;38206_048_A&lt;BR /&gt;AucuneLaval - Château&lt;BR /&gt;38206_048_B&lt;BR /&gt;A commander 2022 - 07LAVAL - Mairie0.4 km&lt;BR /&gt;38206_048_B&lt;BR /&gt;A commander 2022 - 07Laval - Église0.3 km&lt;BR /&gt;38206_048_C1&lt;BR /&gt;Commande N°03 2021LES ADRETS5.4 km&lt;BR /&gt;38206_048_C1&lt;BR /&gt;Commande N°03 2021COL DU LAUTARET4.3 km&lt;BR /&gt;38206_048_C2&lt;BR /&gt;Commande N°03 2021LES CRÊTS2.4 km&lt;BR /&gt;38206_048_C2&lt;BR /&gt;Commande N°03 2021TOUR DE MONTFALLET0.6 km&lt;BR /&gt;38206_048_D&lt;BR /&gt;AucuneLE CHAMP PRES FROGES3.3 km&lt;BR /&gt;38206_048_D&lt;BR /&gt;AucuneFROGES3.3 km&lt;BR /&gt;38206_048_D&lt;BR /&gt;AucuneCôtes Rousses0.8 km&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I want: to group my result according to the 'Ref_Gravee' field. I tried with GROUP BY and FOR IN but I can't.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_A&lt;/FONT&gt;&lt;BR /&gt;AucuneLaval - Château&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_B&lt;/FONT&gt;&lt;BR /&gt;A commander 2022 - 07LAVAL - Mairie0.4 km&lt;BR /&gt;A commander 2022 - 07Laval - Église0.3 km&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_C1&lt;/FONT&gt;&lt;BR /&gt;Commande N°03 2021LES ADRETS5.4 km&lt;BR /&gt;Commande N°03 2021COL DU LAUTARET4.3 km&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;38206_048_C2&lt;/FONT&gt;&lt;BR /&gt;Commande N°03 2021LES CRÊTS2.4 km&lt;BR /&gt;Commande N°03 2021TOUR DE MONTFALLET0.6 km&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_D&lt;/FONT&gt;&lt;BR /&gt;AucuneLE CHAMP PRES FROGES3.3 km&lt;BR /&gt;AucuneFROGES3.3 km&lt;BR /&gt;AucuneCôtes Rousses0.8 km&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help&lt;BR /&gt;Do not hesitate if you need clarification&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aurélien&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2023 20:57:48 GMT</pubDate>
    <dc:creator>MOGOMAINTERNE</dc:creator>
    <dc:date>2023-02-02T20:57:48Z</dc:date>
    <item>
      <title>ARCADE Groups BY Function</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-groups-by-function/m-p/1254390#M50096</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;In AGOL, I want to return a result with a loop (contextual window) depending on the value present in a field. I'm a beginner with ARCADE and I can't do what I want&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;My ARCADE expression is:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;// Acess 'Groundwater Levels Monthly Mean' table as a FeatureSet&lt;BR /&gt;var portal = Portal("&lt;A href="https://www.arcgis.com" target="_blank" rel="noopener"&gt;https://www.arcgis.com&lt;/A&gt;")&lt;BR /&gt;var waterLevels = FeatureSetByPortalItem(portal,&lt;BR /&gt;"2700a42fce724cd588477fd60f1d84c1", 1, ['Commande', 'Etat_Pose',&lt;BR /&gt;'Ref_Gravee', 'Num_poteau', 'Ligne','Texte', 'Altitude', 'Longueur','Tps_pedestre', 'Altitude', 'Sens'])&lt;/P&gt;&lt;P&gt;// Filter related features by using a common attribute&lt;BR /&gt;var NUM_ENTITE = $feature["NUM_ENTITE"]&lt;BR /&gt;var filterStatement = 'Num_poteau = @NUM_ENTITE'&lt;/P&gt;&lt;P&gt;// Related features as a variable&lt;BR /&gt;var relatedData = Filter(waterLevels, filterStatement)&lt;BR /&gt;&lt;BR /&gt;// Sort related features by oldest to newest&lt;BR /&gt;var relatedDataSorted = OrderBy(relatedData, 'Ref_Gravee')&lt;/P&gt;&lt;P&gt;// Build the pop-up string by iterating through all related features&lt;BR /&gt;var popupString = ''&lt;BR /&gt;for (var f in relatedDataSorted){&lt;BR /&gt;&lt;BR /&gt;popupString += f.Ref_Gravee + TextFormatting.NewLine +&lt;BR /&gt;&lt;BR /&gt;f.Commande + f.Texte + f.Longueur + TextFormatting.NewLine&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;DefaultValue(popupString, 'No measurements to show')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;My result :&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;38206_048_A&lt;BR /&gt;AucuneLaval - Château&lt;BR /&gt;38206_048_B&lt;BR /&gt;A commander 2022 - 07LAVAL - Mairie0.4 km&lt;BR /&gt;38206_048_B&lt;BR /&gt;A commander 2022 - 07Laval - Église0.3 km&lt;BR /&gt;38206_048_C1&lt;BR /&gt;Commande N°03 2021LES ADRETS5.4 km&lt;BR /&gt;38206_048_C1&lt;BR /&gt;Commande N°03 2021COL DU LAUTARET4.3 km&lt;BR /&gt;38206_048_C2&lt;BR /&gt;Commande N°03 2021LES CRÊTS2.4 km&lt;BR /&gt;38206_048_C2&lt;BR /&gt;Commande N°03 2021TOUR DE MONTFALLET0.6 km&lt;BR /&gt;38206_048_D&lt;BR /&gt;AucuneLE CHAMP PRES FROGES3.3 km&lt;BR /&gt;38206_048_D&lt;BR /&gt;AucuneFROGES3.3 km&lt;BR /&gt;38206_048_D&lt;BR /&gt;AucuneCôtes Rousses0.8 km&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What I want: to group my result according to the 'Ref_Gravee' field. I tried with GROUP BY and FOR IN but I can't.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_A&lt;/FONT&gt;&lt;BR /&gt;AucuneLaval - Château&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_B&lt;/FONT&gt;&lt;BR /&gt;A commander 2022 - 07LAVAL - Mairie0.4 km&lt;BR /&gt;A commander 2022 - 07Laval - Église0.3 km&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_C1&lt;/FONT&gt;&lt;BR /&gt;Commande N°03 2021LES ADRETS5.4 km&lt;BR /&gt;Commande N°03 2021COL DU LAUTARET4.3 km&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;38206_048_C2&lt;/FONT&gt;&lt;BR /&gt;Commande N°03 2021LES CRÊTS2.4 km&lt;BR /&gt;Commande N°03 2021TOUR DE MONTFALLET0.6 km&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;38206_048_D&lt;/FONT&gt;&lt;BR /&gt;AucuneLE CHAMP PRES FROGES3.3 km&lt;BR /&gt;AucuneFROGES3.3 km&lt;BR /&gt;AucuneCôtes Rousses0.8 km&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help&lt;BR /&gt;Do not hesitate if you need clarification&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Aurélien&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2023 20:57:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-groups-by-function/m-p/1254390#M50096</guid>
      <dc:creator>MOGOMAINTERNE</dc:creator>
      <dc:date>2023-02-02T20:57:48Z</dc:date>
    </item>
  </channel>
</rss>

