<?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: Web Map Popup - Display URL Hyperlink if Exists? in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719673#M69459</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/935317"&gt;@ArthurSmith2&lt;/a&gt;&amp;nbsp;I'm not sure to be honest - at first I thought this would work but now thinking about it, I don't think there's a way to get the hyperlink text to disappear in the popup when there's nothing to open. It may be a limit of using the text as a hyperlink.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 10 Aug 2026 18:39:47 GMT</pubDate>
    <dc:creator>JonM32</dc:creator>
    <dc:date>2026-08-10T18:39:47Z</dc:date>
    <item>
      <title>Web Map Popup - Display URL Hyperlink if Exists?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719576#M69453</link>
      <description>&lt;P&gt;Hello Esri Community!&amp;nbsp; I am looking for help with a seemingly simple task: within a popup text element, I want to display a clickable hyperlink for a record if it exists.&lt;/P&gt;&lt;P&gt;The closest I have come is using this Arcade expression and text element configuration... however the 'View Link' text shows as un-clickable link if URL not populated; not ideal.&lt;/P&gt;&lt;P&gt;I want the 'View Link' clickable text to only show if link present.&amp;nbsp; Can someone explain how this can be accomplished?&amp;nbsp; Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArthurSmith2_1-1786374707423.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/156534i7C0D2B1501E69255/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArthurSmith2_1-1786374707423.png" alt="ArthurSmith2_1-1786374707423.png" /&gt;&lt;/span&gt;&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="ArthurSmith2_0-1786374649765.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/156533i514EA299E2FA4121/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArthurSmith2_0-1786374649765.png" alt="ArthurSmith2_0-1786374649765.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;// Reference your attribute field containing the URL&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;myUrl&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;ASBUILTS&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;// Check if the field is empty or null&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;IsEmpty&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;myUrl&lt;/SPAN&gt;&lt;SPAN&gt;) || &lt;/SPAN&gt;&lt;SPAN&gt;Trim&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;myUrl&lt;/SPAN&gt;&lt;SPAN&gt;) == &lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;""&lt;/SPAN&gt;&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;// Return nothing if it doesn't exist&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;} &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;// Return a formatted HTML link if it does exist&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;//return '&amp;lt;a href="' + myUrl + '" &amp;nbsp;target="_blank" rel="noopener noreferrer"&amp;gt;Visit Website&amp;lt;/a&amp;gt;';&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;myUrl&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Aug 2026 15:13:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719576#M69453</guid>
      <dc:creator>ArthurSmith2</dc:creator>
      <dc:date>2026-08-10T15:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Web Map Popup - Display URL Hyperlink if Exists?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719587#M69454</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/935317"&gt;@ArthurSmith2&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is one idea for your expression. It should return a URL is if exists, and if it doesn't, nothing will be returned.&lt;/P&gt;&lt;P&gt;var myUrl = Trim(DefaultValue($feature.ASBUILTS, ""));&lt;/P&gt;&lt;P&gt;if (IsEmpty(myUrl)) {&lt;BR /&gt;return "";&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;return '&amp;lt;a href="' + myUrl + '" target="_blank" rel="noopener noreferrer"&amp;gt;View Link&amp;lt;/a&amp;gt;';&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2026 15:46:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719587#M69454</guid>
      <dc:creator>JonM32</dc:creator>
      <dc:date>2026-08-10T15:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Web Map Popup - Display URL Hyperlink if Exists?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719633#M69456</link>
      <description>&lt;P&gt;Hi Jon, thanks for your response!&lt;/P&gt;&lt;P&gt;I tried using your Arcade code and unfortunately the Map Viewer isn't rendering as an html link and instead shows the plain text html:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ArthurSmith2_0-1786381032393.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/156552i0BCFB626BCF15382/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ArthurSmith2_0-1786381032393.png" alt="ArthurSmith2_0-1786381032393.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any ideas to resolve?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2026 16:57:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719633#M69456</guid>
      <dc:creator>ArthurSmith2</dc:creator>
      <dc:date>2026-08-10T16:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Web Map Popup - Display URL Hyperlink if Exists?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719673#M69459</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/935317"&gt;@ArthurSmith2&lt;/a&gt;&amp;nbsp;I'm not sure to be honest - at first I thought this would work but now thinking about it, I don't think there's a way to get the hyperlink text to disappear in the popup when there's nothing to open. It may be a limit of using the text as a hyperlink.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2026 18:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719673#M69459</guid>
      <dc:creator>JonM32</dc:creator>
      <dc:date>2026-08-10T18:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Web Map Popup - Display URL Hyperlink if Exists?</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719703#M69461</link>
      <description>&lt;P&gt;You have to add that code in an &lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/configure-pop-ups-mv.htm#ESRI_SECTION1_F5CB09E0313A4DA1BD10F18D875FFC3F" target="_self"&gt;Arcade element&lt;/A&gt; for the html link to work properly. The code would look something like this (which also uses &lt;A href="https://developers.arcgis.com/arcade/guide/template-literals/" target="_self"&gt;template literals)&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var myUrl = Trim(DefaultValue($feature.ASBUILTS, ""));
var output = "";
if (!IsEmpty(myUrl)) {
  output = `&amp;lt;a href="${myUrl}" target="_blank" rel="noopener noreferrer"&amp;gt;View Link&amp;lt;/a&amp;gt;`;
}

return { 
  type: "text", 
  text: output 
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2026 20:37:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/web-map-popup-display-url-hyperlink-if-exists/m-p/1719703#M69461</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2026-08-10T20:37:16Z</dc:date>
    </item>
  </channel>
</rss>

