<?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 Help with custom Arcade expressions in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/help-with-custom-arcade-expressions/m-p/44892#M2156</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a custom popup using Arcade expressions that shows upcoming park events. I have an expression that allows a field containing URL's to be displayed in the popup if it is not null (Image 1). This works just fine within my popup but I cannot figure out how to change the visible text from showing the URL link to link text (example 2). In my popup, I would like the link URL to have the text "Click Here for More Info or to Sign up" like the first URL link. Does this need to be done within the Arcade expression?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image 1&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="482924" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/482924_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Image 2&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="482925" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/482925_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{expression/expr15} is the Arcade expression that I would like to display the link text&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I change the Link Text here, it displays the text even if the field does not contain a URL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/482927_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Feb 2020 15:12:06 GMT</pubDate>
    <dc:creator>DaveK</dc:creator>
    <dc:date>2020-02-21T15:12:06Z</dc:date>
    <item>
      <title>Help with custom Arcade expressions</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-custom-arcade-expressions/m-p/44892#M2156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a custom popup using Arcade expressions that shows upcoming park events. I have an expression that allows a field containing URL's to be displayed in the popup if it is not null (Image 1). This works just fine within my popup but I cannot figure out how to change the visible text from showing the URL link to link text (example 2). In my popup, I would like the link URL to have the text "Click Here for More Info or to Sign up" like the first URL link. Does this need to be done within the Arcade expression?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image 1&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="482924" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/482924_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Image 2&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="482925" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/482925_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{expression/expr15} is the Arcade expression that I would like to display the link text&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I change the Link Text here, it displays the text even if the field does not contain a URL.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/482927_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2020 15:12:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-custom-arcade-expressions/m-p/44892#M2156</guid>
      <dc:creator>DaveK</dc:creator>
      <dc:date>2020-02-21T15:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Help with custom Arcade expressions</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-custom-arcade-expressions/m-p/44893#M2157</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/388467" target="_blank"&gt;David Krady&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will probably need to enter the HTML format of the link and combine it with&amp;nbsp;some tags that influence the visibility (as explained here: &lt;A href="https://community.esri.com/docs/DOC-14276" target="_blank"&gt;Conditional Field display with Arcade in Pop Ups (revisited)&lt;/A&gt;&amp;nbsp;).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To enter the html, you have to activate it using the button indicated with the red color:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/482943_pastedImage_8.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A link in html will normally look like, where&amp;nbsp; you will see the URL and the actual text being shown:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;&lt;/SPAN&gt;a&lt;/SPAN&gt; &lt;SPAN class="attr-name token"&gt;href&lt;/SPAN&gt;&lt;SPAN class="attr-value token"&gt;&lt;SPAN class="punctuation token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;https://www.w3schools.com&lt;SPAN class="punctuation token"&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;Visit W3Schools.com!&lt;SPAN class="token tag"&gt;&lt;SPAN class="token tag"&gt;&lt;SPAN class="punctuation token"&gt;&amp;lt;/&lt;/SPAN&gt;a&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you combine this with what you are trying to accomplish and the&amp;nbsp;description in the link above, you could&amp;nbsp;create something like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;a href&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{URLFieldName}"&lt;/SPAN&gt; style&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;"display&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;expression&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;expr0&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;Click Here &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; More Info or to Sign up&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;a&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;‍
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;span style&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;"display&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;expression&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;expr1&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;No link available&lt;SPAN class="punctuation 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="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;span&lt;SPAN class="operator token"&gt;&amp;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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;In the example above:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;you will specify the field with the hyperlink "{URLFieldName}"&lt;/LI&gt;&lt;LI&gt;the expression/expr0 (numbers will be different in your case) will be a simple expression that checks if a field is empty or not and returns block or none (see example in link)&lt;/LI&gt;&lt;LI&gt;On the second row the expression/expr1 will do the opposite and show a alternative text when you don't have a link. This is optional.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:43:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-custom-arcade-expressions/m-p/44893#M2157</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-10T21:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help with custom Arcade expressions</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/help-with-custom-arcade-expressions/m-p/44894#M2158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you&amp;nbsp;try adding another expression checking for null, only returning the "click here" text if the URL is populated?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Feb 2020 20:46:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/help-with-custom-arcade-expressions/m-p/44894#M2158</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2020-02-21T20:46:03Z</dc:date>
    </item>
  </channel>
</rss>

