<?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: Attribute expression that includes an ampersand doesn't display correctly in popup in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1487427#M59631</link>
    <description>&lt;P&gt;Have you tried &amp;amp;&amp;amp; ?&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2024 19:46:45 GMT</pubDate>
    <dc:creator>epckay</dc:creator>
    <dc:date>2024-06-07T19:46:45Z</dc:date>
    <item>
      <title>Attribute expression that includes an ampersand doesn't display correctly in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1486035#M59595</link>
      <description>&lt;P&gt;Some of my data has ampersand characters in the &lt;STRONG&gt;name&lt;/STRONG&gt; field which I'm trying to use as the &lt;STRONG&gt;Title&lt;/STRONG&gt;&amp;nbsp;of the &lt;STRONG&gt;Field List&lt;/STRONG&gt; element in my popup.&amp;nbsp; This works fine if I just use &lt;STRONG&gt;{name}&lt;/STRONG&gt; in the relevant fields of my popup:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MappyIan_0-1717664056252.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106334iE2871BFDED66D364/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MappyIan_0-1717664056252.png" alt="MappyIan_0-1717664056252.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However some of my features do not have a value for the name attribute, so I created an attribute expression that uses the &lt;FONT face="courier new,courier"&gt;DefaultValue&lt;/FONT&gt; function to insert some default text if there is no name value, code below:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;DefaultValue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'Unnamed building'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;SPAN&gt;Using this expression in my popup, in the Title field of the popup it displays correctly (circled in green in the image below), but in the Title and Description fields of the &lt;STRONG&gt;Field List&lt;/STRONG&gt; component all ampersands display as&amp;nbsp;&lt;STRONG&gt;&amp;amp;#38;&lt;/STRONG&gt; (circled in red in the image below):&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MappyIan_1-1717665157946.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106339iFFE2031BA54A639D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MappyIan_1-1717665157946.png" alt="MappyIan_1-1717665157946.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried using the REPLACE function to replace '&amp;amp;' with '&amp;amp;amp;' but that doesn't resolve the issue.&lt;/P&gt;&lt;P&gt;It's annoying that it works fine in the Title field of the &lt;EM&gt;&lt;STRONG&gt;Popup&lt;/STRONG&gt;&lt;/EM&gt;, but not in the Title and Description fields of the &lt;EM&gt;&lt;STRONG&gt;Field List&lt;/STRONG&gt;&lt;/EM&gt; component, as it's the Title of the Field List that I want to use it in.&amp;nbsp; The inconsistency of this makes me think it's a bug, I can't imagine this is deliberate behaviour.&lt;/P&gt;&lt;P&gt;A workaround is to use the REPLACE function and replace '&amp;amp;' with 'and', but this is a bit misleading as users will be using the search function to search for buildings by their 'name'.&amp;nbsp; If we display the name as 'Bar and SCR' users will expect that is how the data is stored and would logically search for 'bar and scr' rather than 'bar &amp;amp; scr'.&lt;/P&gt;&lt;P&gt;I'd love to know if there is a way to resolve this without having to use the REPLACE function to replace '&amp;amp;' with 'and'.&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Jun 2024 09:39:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1486035#M59595</guid>
      <dc:creator>MappyIan</dc:creator>
      <dc:date>2024-06-06T09:39:37Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute expression that includes an ampersand doesn't display correctly in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1487427#M59631</link>
      <description>&lt;P&gt;Have you tried &amp;amp;&amp;amp; ?&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2024 19:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1487427#M59631</guid>
      <dc:creator>epckay</dc:creator>
      <dc:date>2024-06-07T19:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute expression that includes an ampersand doesn't display correctly in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1488788#M59677</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/565591"&gt;@epckay&lt;/a&gt;, thanks for the suggestion but replacing '&amp;amp;' with '&amp;amp;&amp;amp;' doesn't fix the problem.&amp;nbsp; This is the code I used in my expression, and the results are shown below.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;DefaultValue&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;replace&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"&amp;amp;"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"&amp;amp;&amp;amp;"&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'Unnamed building'&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/PRE&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MappyIan_0-1718096154346.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/106712i8C17405A8FE0043C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MappyIan_0-1718096154346.png" alt="MappyIan_0-1718096154346.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Jun 2024 08:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1488788#M59677</guid>
      <dc:creator>MappyIan</dc:creator>
      <dc:date>2024-06-11T08:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Attribute expression that includes an ampersand doesn't display correctly in popup</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1491652#M59710</link>
      <description>&lt;P&gt;In case anyone else encounters this issue I reported it to ESRI UK Support and they've logged it as a bug for ESRI Inc to investigate.&amp;nbsp; I'll post any updates here.&amp;nbsp; Bug ID is:&amp;nbsp;&lt;A href="https://support.esri.com/en-us/bug/BUG-000168321" target="_blank"&gt;https://support.esri.com/en-us/bug/BUG-000168321&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 14:44:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/attribute-expression-that-includes-an-ampersand/m-p/1491652#M59710</guid>
      <dc:creator>MappyIan</dc:creator>
      <dc:date>2024-06-13T14:44:48Z</dc:date>
    </item>
  </channel>
</rss>

