<?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: Arcade Expression - Remove first 4 Characters from records, unless they contain the Prefix of 'MDU ' in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/arcade-expression-remove-first-4-characters-from/m-p/1611940#M18799</link>
    <description>&lt;P&gt;This will remove "MDU " from your string if it contains it. Otherwise, the original string will be returned&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var label = $feature.MDU_NAME
return iif(Left(label, 4) == 'MDU ', Mid(label, 4), label);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 06 May 2025 13:14:28 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2025-05-06T13:14:28Z</dc:date>
    <item>
      <title>Arcade Expression - Remove first 4 Characters from records, unless they contain the Prefix of 'MDU '</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/arcade-expression-remove-first-4-characters-from/m-p/1611936#M18798</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to Arcade Expressions and after some assistance with a query i have below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a dataset that I would like to label using the label Expression in MapViewer.&lt;/P&gt;&lt;P&gt;Most of my data contains an attribute starting with 'MDU ', ( including a space after the MDU)&amp;nbsp; so I would like to remove this part of the record which I have managed to do with the expression below:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Right($feature.MDU_NAME, Count($feature.MDU_NAME) - 4)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So this is fine and works for all records starting with 'MDU' but removes the first 4 characters of records that do not contain MDU which is an issue, such as the record below High Speed 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="StephenDuncan_1-1746535862439.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/131606iCF2F18BA9A7E1212/image-size/medium?v=v2&amp;amp;px=400" role="button" title="StephenDuncan_1-1746535862439.png" alt="StephenDuncan_1-1746535862439.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If anyone can help me with the IF statement to only apply the expression to records that 'MDU ' is present, that would be much appreciated.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 13:02:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/arcade-expression-remove-first-4-characters-from/m-p/1611936#M18798</guid>
      <dc:creator>StephenDuncan</dc:creator>
      <dc:date>2025-05-06T13:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - Remove first 4 Characters from records, unless they contain the Prefix of 'MDU '</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/arcade-expression-remove-first-4-characters-from/m-p/1611940#M18799</link>
      <description>&lt;P&gt;This will remove "MDU " from your string if it contains it. Otherwise, the original string will be returned&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var label = $feature.MDU_NAME
return iif(Left(label, 4) == 'MDU ', Mid(label, 4), label);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 May 2025 13:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/arcade-expression-remove-first-4-characters-from/m-p/1611940#M18799</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-05-06T13:14:28Z</dc:date>
    </item>
  </channel>
</rss>

