<?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: How to use multiple 'Replace' Arcade functions? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-multiple-replace-arcade-functions/m-p/282581#M12274</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Each Replace returns a string, and the expression can only return one value, so I think that's why only the last Replace was honored. You could create a variable to store the string from the first Replace,&amp;nbsp;then do a second replace based on that string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;var str = Replace($feature.NAME + " Grades " + $feature.LO_GRD + "-" + $feature.HI_GRD,'0','K')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Replace(str,'1K','10')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Nov 2018 01:24:17 GMT</pubDate>
    <dc:creator>StephenM</dc:creator>
    <dc:date>2018-11-02T01:24:17Z</dc:date>
    <item>
      <title>How to use multiple 'Replace' Arcade functions?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-multiple-replace-arcade-functions/m-p/282580#M12273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an Arcade labeling expression that is using the Replace function.&amp;nbsp; It works fine, but I have found that there are certain instances of the text that I don't want to replace.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I add an additional Replace function, only the last one is honored.&amp;nbsp; How can I resolve this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have is like this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Replace($feature.NAME + " Grades " + $feature.LO_GRD + "-" + $feature.HI_GRD, '0', 'K')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It works, but if a zero (0) is in the name field, it also is replaced with a 'K'.&lt;/P&gt;&lt;P&gt;I tried to add an additional statement to replace the new string that is wrong.&lt;/P&gt;&lt;P&gt;Like this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;Replace($feature.NAME + " Grades " + $feature.LO_GRD + "-" + $feature.HI_GRD, '0', 'K')&lt;/P&gt;&lt;P&gt;Replace($feature.NAME + " Grades " + $feature.LO_GRD + "-" + $feature.HI_GRD, '1K', '10')&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;But that is not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any information you are willing to share would be much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcade expression‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2018 21:49:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-multiple-replace-arcade-functions/m-p/282580#M12273</guid>
      <dc:creator>JosephFaliti</dc:creator>
      <dc:date>2018-11-01T21:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to use multiple 'Replace' Arcade functions?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-multiple-replace-arcade-functions/m-p/282581#M12274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Each Replace returns a string, and the expression can only return one value, so I think that's why only the last Replace was honored. You could create a variable to store the string from the first Replace,&amp;nbsp;then do a second replace based on that string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;var str = Replace($feature.NAME + " Grades " + $feature.LO_GRD + "-" + $feature.HI_GRD,'0','K')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;Replace(str,'1K','10')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2018 01:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-multiple-replace-arcade-functions/m-p/282581#M12274</guid>
      <dc:creator>StephenM</dc:creator>
      <dc:date>2018-11-02T01:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to use multiple 'Replace' Arcade functions?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-multiple-replace-arcade-functions/m-p/282582#M12275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stephen M,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp; Works great!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Nov 2018 15:35:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-use-multiple-replace-arcade-functions/m-p/282582#M12275</guid>
      <dc:creator>JosephFaliti</dc:creator>
      <dc:date>2018-11-02T15:35:21Z</dc:date>
    </item>
  </channel>
</rss>

