<?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 Remove extra spaces from string using Arcade in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248703#M10973</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to calculate a field by concatenating several other fields. I need to remove extra spaces from the concatenated string. There's a straightforward way to do this in Python:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;concatVar&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm trying to do the equivalent thing using Arcade, since attribute rules require it. I've played around with Arcade's &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;split&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;concatenate&lt;/SPAN&gt; and even &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;replace&lt;/SPAN&gt;, the latter of which can get the job done but isn't ideal. This seems like the most literal equivalent of the Python function:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;concatenate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;split&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;concatVar&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The split and repeated concatenation is pointless; it still doesn't get rid of the extra spaces. The fundamental problem seems to be that Arcade's &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;split&lt;/SPAN&gt; function requires a separator to be specified rather than&amp;nbsp;treating whitespace of any amount as a separator by default like Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also thought about creating a &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;for&lt;/SPAN&gt; loop to trim each variable and/or use &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;IsEmpty&lt;/SPAN&gt;&amp;nbsp;to find and remove nulls before they're even added to the concatenated string, but I thought there must be a simpler way. Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Dec 2019 20:17:27 GMT</pubDate>
    <dc:creator>JeffThomasILM</dc:creator>
    <dc:date>2019-12-20T20:17:27Z</dc:date>
    <item>
      <title>Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248703#M10973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to calculate a field by concatenating several other fields. I need to remove extra spaces from the concatenated string. There's a straightforward way to do this in Python:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;concatVar&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;split&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm trying to do the equivalent thing using Arcade, since attribute rules require it. I've played around with Arcade's &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;split&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;concatenate&lt;/SPAN&gt; and even &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;replace&lt;/SPAN&gt;, the latter of which can get the job done but isn't ideal. This seems like the most literal equivalent of the Python function:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;concatenate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;split&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;concatVar&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The split and repeated concatenation is pointless; it still doesn't get rid of the extra spaces. The fundamental problem seems to be that Arcade's &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;split&lt;/SPAN&gt; function requires a separator to be specified rather than&amp;nbsp;treating whitespace of any amount as a separator by default like Python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've also thought about creating a &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;for&lt;/SPAN&gt; loop to trim each variable and/or use &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;IsEmpty&lt;/SPAN&gt;&amp;nbsp;to find and remove nulls before they're even added to the concatenated string, but I thought there must be a simpler way. Thanks for any help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 20:17:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248703#M10973</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2019-12-20T20:17:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248704#M10974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/people/jeff.thomasilm" target="_blank"&gt;jeff.thomasilm&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pretty sure that this is not the best or fastest way, but it would work:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; concatVar &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"this is a test"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"    "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"let's see if this work"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;null&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; text1 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Concatenate&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;concatVar&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; list2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Split&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;text1&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; i &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; list2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;IsEmpty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;list2&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;result &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; list2&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            result &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; list2&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;i&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
    &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; result&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:22:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248704#M10974</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-11T12:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248705#M10975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;You're the #1 answerer of my questions on GeoNet. Thank you! You went ahead and created a &lt;SPAN style="font-family: 'andale mono', monospace;"&gt;for&lt;/SPAN&gt; loop like I theorized, but would have taken me a long time to figure out!&amp;nbsp;Indeed, it does work. I'm left shaking my head once again at the verbosity of Arcade vs. Python. But, you did concede that it's probably not the best or fastest way. Though I really appreciate the speed of your reply!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 21:14:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248705#M10975</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2019-12-20T21:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248706#M10976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/193614"&gt;Jeff Thomas&lt;/A&gt;&amp;nbsp;, you're welcome, glad it works, but I am still&amp;nbsp;unsure if this is the fastest way. I am going to see if it is possible to do this without a loop...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Dec 2019 21:34:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248706#M10976</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-12-20T21:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248707#M10977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/193614"&gt;Jeff Thomas&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried several other options that are available in normal JavaScript (shift, pop, splice, filter), but none seem to be supported in Arcade. Maybe in the future...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Dec 2019 14:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248707#M10977</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-12-24T14:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248708#M10978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to like Arcade,&amp;nbsp;and its use is mandatory for many newer functions of Pro and AGOL, but... it's a young language. There will be bumps. Thank you again for your help,&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/3100"&gt;Xander Bakker&lt;/A&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Jan 2020 21:30:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/248708#M10978</guid>
      <dc:creator>JeffThomasILM</dc:creator>
      <dc:date>2020-01-08T21:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/1044161#M39326</link>
      <description>&lt;P&gt;Perfectly perfect!!!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 14:42:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/1044161#M39326</guid>
      <dc:creator>GISAdmin_2008</dc:creator>
      <dc:date>2021-04-06T14:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/1173551#M55121</link>
      <description>&lt;P&gt;Is this still the only way to clean excess spaces?&lt;/P&gt;&lt;P&gt;Oh and here's my small contribution of wrapping it up in a function; obviously just a re-mix on the great work of &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1108"&gt;@XanderBakker&lt;/a&gt;&amp;nbsp;:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function remove_excess_spaces(input_string) {
    var array_for_input = SPLIT(input_string, " ")
    var result = ""
    for (var item in array_for_input) { 
        if (!ISEMPTY(array_for_input[item])) {
            if (result == "") {
                result = array_for_input[item]
            } else {
                result += " " + array_for_input[item]
            }
        }
    }
    return result
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This solved a huge problem for me which involves enforcing some addressing standards without creating constraint rules or otherwise requiring users to manually review work that can be corrected programmatically.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var i = 0
var features = []
function add_value(feature_parameter) {
    if (ISEMPTY(feature_parameter) == false) {
        features[i++] = UPPER(remove_excess_spaces(feature_parameter))
    }
}

add_value($feature.St_PreMod)
add_value($feature.St_PreDir)
add_value($feature.St_PreTyp)
add_value($feature.St_PreSep)
add_value($feature.St_Name)
add_value($feature.St_PosTyp)
add_value($feature.St_PosDir)
add_value($feature.St_PosMod)

var full_name = CONCATENATE(features, " ")

return {
    "result" : {
        "attributes" : {
            "St_PreMod" : UPPER(remove_excess_spaces($feature.St_PreMod)),
            "St_PreTyp" : UPPER(remove_excess_spaces($feature.St_PreTyp)),
            "St_PreSep" : UPPER(remove_excess_spaces($feature.St_PreSep)),
            "St_Name" : UPPER(remove_excess_spaces($feature.St_Name)),
            "St_PosMod" : UPPER(remove_excess_spaces($feature.St_PosMod)),
            "St_FullName" : full_name
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;As a Pythonista, I'm hoping that we can get something a little less clunky&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="A comic showing the clumsy way that SQL deals with removing excess spaces." style="width: 500px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/41312i1A102FD583451C46/image-size/large?v=v2&amp;amp;px=999" role="button" title="63opbi.png" alt="A comic showing the clumsy way that SQL deals with removing excess spaces." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;A comic showing the clumsy way that SQL deals with removing excess spaces.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 13 May 2022 13:43:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/1173551#M55121</guid>
      <dc:creator>feralcatcolonist_old</dc:creator>
      <dc:date>2022-05-13T13:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Remove extra spaces from string using Arcade</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/1181995#M56105</link>
      <description>&lt;P&gt;I'm new to Pro, and find that some of the processes are clunky.&amp;nbsp; I used field calculator quickly and easily in the old ArcGIS 10.x with this reference:&amp;nbsp;&lt;A href="https://www.esri.com/news/arcuser/0405/files/fieldcalc_1.pdf" target="_blank"&gt;https://www.esri.com/news/arcuser/0405/files/fieldcalc_1.pdf&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Jun 2022 18:01:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/remove-extra-spaces-from-string-using-arcade/m-p/1181995#M56105</guid>
      <dc:creator>AdminGIS3</dc:creator>
      <dc:date>2022-06-10T18:01:26Z</dc:date>
    </item>
  </channel>
</rss>

