<?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 do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/1256568#M50265</link>
    <description>&lt;P&gt;I stumbled upon this thread when I was looking to remove part of a label from a feature field in a webmap. Here's what I ended up with:&lt;/P&gt;&lt;P&gt;//All labels are in Brighton with the same zip code. Expression removes town and zip code&lt;/P&gt;&lt;P&gt;var txt = $feature.Location&lt;BR /&gt;txt = Replace(txt, ", BRIGHTON, 84121", "");&lt;BR /&gt;return txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexRudowski_0-1675961990856.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62448i4C63123071AAB97B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlexRudowski_0-1675961990856.png" alt="AlexRudowski_0-1675961990856.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 09 Feb 2023 17:00:40 GMT</pubDate>
    <dc:creator>AlexRudowski</dc:creator>
    <dc:date>2023-02-09T17:00:40Z</dc:date>
    <item>
      <title>How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751912#M36911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have users who populate a field that is used to label features on a map that is used by many other users.&amp;nbsp; I have no control over what/how they populate this field.&amp;nbsp; For whatever reason, several users insist on proceeding the actual value with arbitrary special characters such as !!**, !***, ^^**, *** (presumably for sorting purposes).&amp;nbsp; The end users of the data do not wish to see these characters when used as labels in commonly used maps and apps.&amp;nbsp; The leading characters differ all the time and I am having a hard time grasping how to replace multiple characters if/when needed.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 10:45:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751912#M36911</guid>
      <dc:creator>AmyEverett1</dc:creator>
      <dc:date>2020-05-19T10:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751913#M36912</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/158453" target="_blank"&gt;Amy Everett&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I those characters&amp;nbsp;always have to be removed no matter the position of these characters, you could use&amp;nbsp;Replace. See the example below:&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; txt &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"!!**!***hello world^^*****"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
txt &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;txt&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="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="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="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;return&lt;/SPAN&gt; txt&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This will return "hello world".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your use case is different, could you provide some examples to see what needs to be done?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:55:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751913#M36912</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T07:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751914#M36913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG style="color: #505050; "&gt;There are seldom good technological solutions to behavioral problems....&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #505050;"&gt;&lt;A href="https://mvp.microsoft.com/en-us/PublicProfile/6390?fullName=ed%20crowley"&gt;Ed Crowely&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 14:02:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751914#M36913</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-19T14:02:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751915#M36914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Xander!&amp;nbsp; That was exactly what I was looking for!&amp;nbsp; I didn't think about nesting them that way.&amp;nbsp; I appreciate your assistance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 14:08:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751915#M36914</guid>
      <dc:creator>AmyEverett1</dc:creator>
      <dc:date>2020-05-19T14:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751916#M36915</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/158453"&gt;Amy Everett&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Glad it works, but I want to emphasize what &lt;A href="https://community.esri.com/people/jborgion"&gt;jborgion&lt;/A&gt;&amp;nbsp;mentioned. Why do you have these characters in your data? Is there some part of the process you can change to avoid having these characters in your data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 16:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751916#M36915</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-05-19T16:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751917#M36916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's exactly what I've been wondering as well.&amp;nbsp; Sounds like a quick database tutorial for the users might be time well spent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 16:22:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751917#M36916</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-19T16:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751918#M36917</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I had any authority over the data structure, many things would be different! &amp;nbsp;Unfortunately I am just the recipient who has to make it come together in the end. &amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 18:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751918#M36917</guid>
      <dc:creator>AmyEverett1</dc:creator>
      <dc:date>2020-05-19T18:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751919#M36918</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/amy.b.everett"&gt;amy.b.everett&lt;/A&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for clarifying. Sometimes we just have to work with the data that is provided to us.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 19:12:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/751919#M36918</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-05-19T19:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/1256568#M50265</link>
      <description>&lt;P&gt;I stumbled upon this thread when I was looking to remove part of a label from a feature field in a webmap. Here's what I ended up with:&lt;/P&gt;&lt;P&gt;//All labels are in Brighton with the same zip code. Expression removes town and zip code&lt;/P&gt;&lt;P&gt;var txt = $feature.Location&lt;BR /&gt;txt = Replace(txt, ", BRIGHTON, 84121", "");&lt;BR /&gt;return txt&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlexRudowski_0-1675961990856.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/62448i4C63123071AAB97B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlexRudowski_0-1675961990856.png" alt="AlexRudowski_0-1675961990856.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2023 17:00:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/1256568#M50265</guid>
      <dc:creator>AlexRudowski</dc:creator>
      <dc:date>2023-02-09T17:00:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write an Arcade label expression to remove multiple (and inconsistent) leading characters from a field (e.g. !!**, ^^, ***)?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/1523072#M60929</link>
      <description>&lt;P&gt;Dusted this off today. Still relevant. Super helpful!&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 19:25:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/how-do-i-write-an-arcade-label-expression-to/m-p/1523072#M60929</guid>
      <dc:creator>StevePlettenberg</dc:creator>
      <dc:date>2024-08-16T19:25:48Z</dc:date>
    </item>
  </channel>
</rss>

