<?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 Replace string by symbol with multilines in pop up in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/replace-string-by-symbol-with-multilines-in-pop-up/m-p/1662214#M1606</link>
    <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I have lines and sometimes multilines in my layer with the name of the transport line, the end stop and the time of passage (ex:&amp;nbsp;Lianes 5 vers Pessacc à 12h25). I search to replace the name of the lines by a symbol stored on my Arcgis Portal. It could be like that.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KARIMLABIDI_0-1761835049226.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/142903i6B6322661B0DD123/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KARIMLABIDI_0-1761835049226.png" alt="KARIMLABIDI_0-1761835049226.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If necessary I can split the string and put the 3 values (line, end stop, time) in 3 fields.&lt;/P&gt;&lt;P&gt;I don't know what's the better: arcade or html with expression called.&lt;/P&gt;&lt;P&gt;I asked to Chatgpt who replied this code but it doesn't work (in french sorry).&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;// === TABLEAU DE CORRESPONDANCE LIGNE → ICÔNE ===&lt;BR /&gt;var icons = {&lt;BR /&gt;"A": ############################&lt;/P&gt;&lt;P&gt;"B": #################&lt;/P&gt;&lt;P&gt;.....&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;// === EXEMPLE : VARIABLES DU FLUX ===&lt;BR /&gt;// suppose que ta couche a des champs : Ligne, Terminus, Heure&lt;BR /&gt;var ligne = $feature.Ligne;&lt;BR /&gt;var terminus = $feature.Terminus;&lt;BR /&gt;var heure = $feature.Heure;&lt;/P&gt;&lt;P&gt;// === RÉCUPÉRER L’URL DE L’ICÔNE ===&lt;BR /&gt;var icon = DefaultValue(icons[ligne], "");&lt;/P&gt;&lt;P&gt;// === FORMATTER LE TEXTE HTML ===&lt;BR /&gt;var html = "";&lt;/P&gt;&lt;P&gt;if (icon != "") {&lt;BR /&gt;html += "&amp;lt;img src='" + icon + "' style='height:22px;vertical-align:middle;margin-right:6px;'&amp;gt;";&lt;BR /&gt;} else {&lt;BR /&gt;html += "&amp;lt;b&amp;gt;" + ligne + "&amp;lt;/b&amp;gt; ";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;html += terminus + " – " + heure;&lt;/P&gt;&lt;P&gt;return html;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone has an idea, I take it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 30 Oct 2025 14:45:08 GMT</pubDate>
    <dc:creator>KARIMLABIDI</dc:creator>
    <dc:date>2025-10-30T14:45:08Z</dc:date>
    <item>
      <title>Replace string by symbol with multilines in pop up</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/replace-string-by-symbol-with-multilines-in-pop-up/m-p/1662214#M1606</link>
      <description>&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;I have lines and sometimes multilines in my layer with the name of the transport line, the end stop and the time of passage (ex:&amp;nbsp;Lianes 5 vers Pessacc à 12h25). I search to replace the name of the lines by a symbol stored on my Arcgis Portal. It could be like that.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KARIMLABIDI_0-1761835049226.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/142903i6B6322661B0DD123/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KARIMLABIDI_0-1761835049226.png" alt="KARIMLABIDI_0-1761835049226.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If necessary I can split the string and put the 3 values (line, end stop, time) in 3 fields.&lt;/P&gt;&lt;P&gt;I don't know what's the better: arcade or html with expression called.&lt;/P&gt;&lt;P&gt;I asked to Chatgpt who replied this code but it doesn't work (in french sorry).&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;// === TABLEAU DE CORRESPONDANCE LIGNE → ICÔNE ===&lt;BR /&gt;var icons = {&lt;BR /&gt;"A": ############################&lt;/P&gt;&lt;P&gt;"B": #################&lt;/P&gt;&lt;P&gt;.....&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;// === EXEMPLE : VARIABLES DU FLUX ===&lt;BR /&gt;// suppose que ta couche a des champs : Ligne, Terminus, Heure&lt;BR /&gt;var ligne = $feature.Ligne;&lt;BR /&gt;var terminus = $feature.Terminus;&lt;BR /&gt;var heure = $feature.Heure;&lt;/P&gt;&lt;P&gt;// === RÉCUPÉRER L’URL DE L’ICÔNE ===&lt;BR /&gt;var icon = DefaultValue(icons[ligne], "");&lt;/P&gt;&lt;P&gt;// === FORMATTER LE TEXTE HTML ===&lt;BR /&gt;var html = "";&lt;/P&gt;&lt;P&gt;if (icon != "") {&lt;BR /&gt;html += "&amp;lt;img src='" + icon + "' style='height:22px;vertical-align:middle;margin-right:6px;'&amp;gt;";&lt;BR /&gt;} else {&lt;BR /&gt;html += "&amp;lt;b&amp;gt;" + ligne + "&amp;lt;/b&amp;gt; ";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;html += terminus + " – " + heure;&lt;/P&gt;&lt;P&gt;return html;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If someone has an idea, I take it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Oct 2025 14:45:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/replace-string-by-symbol-with-multilines-in-pop-up/m-p/1662214#M1606</guid>
      <dc:creator>KARIMLABIDI</dc:creator>
      <dc:date>2025-10-30T14:45:08Z</dc:date>
    </item>
  </channel>
</rss>

