<?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: Adding a comma between multiple values in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537856#M88203</link>
    <description>&lt;P&gt;Looks like you can nest if/else statements if you scroll down in the linked documentation to the section titled "Nested if/else". Another option it shows there is the IIF statement that might work for you as well&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/guide/logic/" target="_self"&gt;if else and other control logic &lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Sep 2024 16:27:58 GMT</pubDate>
    <dc:creator>clt_cabq</dc:creator>
    <dc:date>2024-09-12T16:27:58Z</dc:date>
    <item>
      <title>Adding a comma between multiple values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537828#M88200</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have an Arcade script that inserts the name of a boundary polygon if it intersects with the feature. How do I show a comma between only the ones where it intersects multiple polygons? My current code just adds a "," to everyone regardless if it's only one value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var land = FeatureSetByName($datastore,"Boundary_Aug2024",["Name"], true)
var intersectLayer = Intersects(land, Geometry($feature))
var result = '';
if (Count(intersectLayer) &amp;gt; 0) {
    for (var layer in intersectLayer) {
        result += layer.Name+(", ") ;
    }
} else {
    result = "Null"
}  
return result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 15:46:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537828#M88200</guid>
      <dc:creator>IanLadd_Tourmaline</dc:creator>
      <dc:date>2024-09-12T15:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a comma between multiple values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537856#M88203</link>
      <description>&lt;P&gt;Looks like you can nest if/else statements if you scroll down in the linked documentation to the section titled "Nested if/else". Another option it shows there is the IIF statement that might work for you as well&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/guide/logic/" target="_self"&gt;if else and other control logic &lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 16:27:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537856#M88203</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-09-12T16:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a comma between multiple values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537870#M88205</link>
      <description>&lt;P&gt;So I would create an nested if statement where if it's greater than one, then it inserts a comma between the values? How do I specify between them and not end up with another , after the end?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 17:07:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537870#M88205</guid>
      <dc:creator>IanLadd_Tourmaline</dc:creator>
      <dc:date>2024-09-12T17:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a comma between multiple values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537886#M88208</link>
      <description>&lt;P&gt;You can add the items to an array and use the &lt;A href="https://developers.arcgis.com/arcade/function-reference/text_functions/#concatenate" target="_self"&gt;Concatenate&lt;/A&gt; function. This wouldn't add an extra comma if there is only one result.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var land = FeatureSetByName($datastore, "Boundary_Aug2024", ["Name"], true);
var intersectLayer = Intersects(land, Geometry($feature));
var result = [];
if (Count(intersectLayer) == 0) return "Null";
for (var layer in intersectLayer) {
  Push(result, layer.Name);
}
return Concatenate(result, ", ");&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 17:26:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537886#M88208</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-09-12T17:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a comma between multiple values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537890#M88209</link>
      <description>&lt;P&gt;of course this is the best answer! Thanks for showing this approach&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 17:29:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537890#M88209</guid>
      <dc:creator>clt_cabq</dc:creator>
      <dc:date>2024-09-12T17:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a comma between multiple values</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537903#M88211</link>
      <description>&lt;P&gt;Amazing! Thank you so much&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 18:11:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/adding-a-comma-between-multiple-values/m-p/1537903#M88211</guid>
      <dc:creator>IanLadd_Tourmaline</dc:creator>
      <dc:date>2024-09-12T18:11:56Z</dc:date>
    </item>
  </channel>
</rss>

