<?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>idea Allow multiple Replace functions in one Arcade expression in ArcGIS Online Ideas</title>
    <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idi-p/924910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be great if it was possible to utilize multiple replace functions in one Arcade expression in ArcGIS Online. Currently, only the last replace function is actually honored and the others are ignored. See example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace($feature["Gate_Number"], '51 east entrance', 'East Entrance')&lt;/P&gt;&lt;P&gt;Replace($feature["Gate_Number"], '54 middle entrance', 'Middle Entrance')&lt;/P&gt;&lt;P&gt;Replace($feature["Gate_Number"], '1', 'West Entrance')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Feb 2019 18:25:54 GMT</pubDate>
    <dc:creator>erica_poisson</dc:creator>
    <dc:date>2019-02-26T18:25:54Z</dc:date>
    <item>
      <title>Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idi-p/924910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be great if it was possible to utilize multiple replace functions in one Arcade expression in ArcGIS Online. Currently, only the last replace function is actually honored and the others are ignored. See example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Replace($feature["Gate_Number"], '51 east entrance', 'East Entrance')&lt;/P&gt;&lt;P&gt;Replace($feature["Gate_Number"], '54 middle entrance', 'Middle Entrance')&lt;/P&gt;&lt;P&gt;Replace($feature["Gate_Number"], '1', 'West Entrance')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2019 18:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idi-p/924910</guid>
      <dc:creator>erica_poisson</dc:creator>
      <dc:date>2019-02-26T18:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924911#M520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are a couple of ways you can do this already. See examples below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// simply add multiple lines each with one statement&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"51 east entrance, 1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Replace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Gate_Number&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'51 east entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'East Entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Replace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Gate_Number&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'54 middle entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Middle Entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Replace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Gate_Number&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'West Entrance'&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; Gate_Number&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


&lt;SPAN class="comment token"&gt;// nest the Replace funcion&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"51 east entrance, 1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Replace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Replace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Replace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Gate_Number&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'51 east entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'East Entrance'&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;'54 middle entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Middle Entrance'&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;'1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'West Entrance'&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; Gate_Number&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍


&lt;SPAN class="comment token"&gt;// create a list with all the search and replace values and loop through them&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"51 east entrance, 1"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; search_replace &lt;SPAN class="operator 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;'51 east entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'East Entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'54 middle entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Middle Entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'West Entrance'&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;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="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Count&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;search_replace&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; i&lt;SPAN class="operator token"&gt;++&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; search_for &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; search_replace&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="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; replace_with &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; search_replace&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="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Replace&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Gate_Number&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; search_for&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; replace_with&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; Gate_Number&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;/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>Sun, 12 Dec 2021 11:51:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924911#M520</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T11:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924912#M521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xander,&lt;/P&gt;&lt;P&gt;I am trying to do this as a label expression, therefore each replace statement needs to apply to a label for one of three features. I don't see how the above statements could apply to this.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2019 16:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924912#M521</guid>
      <dc:creator>erica_poisson</dc:creator>
      <dc:date>2019-02-27T16:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924913#M522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the label text does not contain the string, it will not replace anything. However, the last one that searches for a 1 and replaces (any coincidence) with the other text might cause problems. If the case is that you want to replace the entire (label) text, you shoud not use Replace. Is that the case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2019 19:42:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924913#M522</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-02-27T19:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924914#M523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Xander,&lt;/P&gt;&lt;P&gt;Sorry for the very late reply. Yes - it is the case where I want to replace the entire text (label) in each instance. So, the replacements would be:&lt;/P&gt;&lt;P&gt;1. Original text = '51 east entrance', replacement text = 'East Entrance'&lt;/P&gt;&lt;P&gt;2. Original text = '54 middle entrance', replacement text = 'Middle Entrance'&lt;/P&gt;&lt;P&gt;3. Original text = '1', replacement text = 'West Entrance'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2019 11:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924914#M523</guid>
      <dc:creator>erica_poisson</dc:creator>
      <dc:date>2019-03-12T11:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924915#M524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can always do something like this:&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; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; $feature&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Gate_Number&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;Gate_Number &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'51 east entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'East Entrance'&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="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Gate_Number &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'54 middle entrance'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Middle Entrance'&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="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Gate_Number &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'1'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Gate_Number &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'West Entrance'&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; Gate_Number&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;... or use the When, Decode or Iff function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:51:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924915#M524</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T11:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924916#M525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xander,&lt;/P&gt;&lt;P&gt;It's been awhile, but thank you for the code! That worked perfectly, and I totally appreciate it.&lt;/P&gt;&lt;P&gt;Erica&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2019 15:42:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924916#M525</guid>
      <dc:creator>erica_poisson</dc:creator>
      <dc:date>2019-05-31T15:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924917#M526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What about replacing multiple sections of text in one single attribute?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex. I want to replace the word "originals" with "" and I want to replace any " " with "%20".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to replace the word "originals" with no text and want to replace any spaces with %20 in order to create a valid url when creating a custom expression hyperlink to one of our virtual directory utilizing a source field with just a folder and file name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example....&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f7f7f7;"&gt;..\originals\Archive\SwrWtr 02of06 87-10.tif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f7f7f7;"&gt;Want the data to look like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;\Archive\SwrWtr%2002of06%2087-10.tif&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've been able to successfully use the Replace function but not against multiple items within the same field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions? Each of these work below separately.... but I want to run multiple Replace functions against the same field $feature.SOURCE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var a = Replace($feature.SOURCE, "originals", "");&lt;BR /&gt;return a;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;or&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var a = Replace($feature.SOURCE, " ", "%20");&lt;BR /&gt;return a;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 18:53:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924917#M526</guid>
      <dc:creator>AlexanderBaker</dc:creator>
      <dc:date>2019-08-08T18:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924918#M527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Figured it out... sharing expression for anyone else wanting to do a replace on multiple&amp;nbsp;strings&amp;nbsp;within one field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var str = Replace($feature.SOURCE,'originals','');&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;var myURL = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2F" rel="nofollow" target="_blank"&gt;http://&lt;/A&gt;&lt;EM&gt;virtualdirectoryurl/&lt;/EM&gt;';&lt;/P&gt;&lt;P&gt;myURL = myURL + Replace(str,' ','%20');&lt;/P&gt;&lt;P&gt;return myURL;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2019 12:37:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924918#M527</guid>
      <dc:creator>AlexanderBaker</dc:creator>
      <dc:date>2019-08-12T12:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Allow multiple Replace functions in one Arcade expression</title>
      <link>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924919#M528</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/AJAMESBAKER_WPB"&gt;AJAMESBAKER_WPB&lt;/A&gt;&amp;nbsp;, you may also want to look at the new function "UrlEncode(url)", which will encode any special character into a proper url valid character combination. You can also nest the replace functions in a single statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2019 13:00:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-ideas/allow-multiple-replace-functions-in-one-arcade/idc-p/924919#M528</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-08-12T13:00:19Z</dc:date>
    </item>
  </channel>
</rss>

