<?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: Variable is assigned but never used (Arcade Question) in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247881#M49753</link>
    <description>&lt;P&gt;Well it looks like there's some confusion here. First, you assign the value of the three variables. Then, you are&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;re-assigning&lt;/STRONG&gt;&lt;/EM&gt; the same three variables to different values within your "if" statements. I think the error is due to trying to return the variables at the same time as assigning them the new value. I think you need to figure out if you want to return the values within your "if" statements or if you want to return the url's you set as the initial values of your variables. Then, set the values within the "if" statements. When you're all done assigning/setting values, return one item. You can't return all three variables I don't believe.&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2023 22:48:49 GMT</pubDate>
    <dc:creator>DougGreen</dc:creator>
    <dc:date>2023-01-12T22:48:49Z</dc:date>
    <item>
      <title>Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247871#M49752</link>
      <description>&lt;P&gt;I have written an Arcade expression, it has 3 variables named link1, link2, and link3. When I test it in Map Viewer Classic, it says that these variables are assigned but never used. Can someone assist me in helping determine what is wrong with the syntax of my code? (I also tried the same expression except using Decode with same results, says variable assigned but never used)&lt;/P&gt;&lt;P&gt;var link1 = '&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="noopener"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;BR /&gt;var link2 = '&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="noopener"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;BR /&gt;var link3 = '&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="noopener"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;BR /&gt;if ($feature.RESOURCETYPE == "Type II (500 - 1,999 persons)")&lt;BR /&gt;return link1 = 'Type II';&lt;BR /&gt;if ($feature.RESOURCETYPE == "Type III (250 - 499 persons)")&lt;BR /&gt;return link2 = 'Type III';&lt;BR /&gt;If ($feature.RESOURCETYPE == "Type IV (249 or fewer persons)")&lt;BR /&gt;return link3 = 'Type IV';&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="variable is assigned but never used.png" style="width: 925px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60336iB51DA16948EBF7B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="variable is assigned but never used.png" alt="variable is assigned but never used.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var link = '&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="noopener"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;BR /&gt;var t = Decode($feature.RESOURCETYPE,&lt;BR /&gt;'Type II (500 - 1,999 persons)', 'Type II (500 - 1,999 persons)',&lt;BR /&gt;'Type III (250 - 499 persons)', 'Type III (250 - 499 persons)',&lt;BR /&gt;'Type IV (249 or fewer persons)', 'Type IV (249 or fewer persons)',&lt;BR /&gt;'')&lt;BR /&gt;&lt;BR /&gt;If ($feature.RESOURCETYPE != "TBD - Leave Blank"){&lt;BR /&gt;return link = t&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 22:29:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247871#M49752</guid>
      <dc:creator>TimHayes3</dc:creator>
      <dc:date>2023-01-12T22:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247881#M49753</link>
      <description>&lt;P&gt;Well it looks like there's some confusion here. First, you assign the value of the three variables. Then, you are&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;re-assigning&lt;/STRONG&gt;&lt;/EM&gt; the same three variables to different values within your "if" statements. I think the error is due to trying to return the variables at the same time as assigning them the new value. I think you need to figure out if you want to return the values within your "if" statements or if you want to return the url's you set as the initial values of your variables. Then, set the values within the "if" statements. When you're all done assigning/setting values, return one item. You can't return all three variables I don't believe.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 22:48:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247881#M49753</guid>
      <dc:creator>DougGreen</dc:creator>
      <dc:date>2023-01-12T22:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247883#M49754</link>
      <description>&lt;P&gt;Thanks, I see what you mean. I made some changes to the code and it gets me the url as the output, but what I want is to have hyperlink text and not just the url in the field. Example output would be the hyperlinked text "Type IV" visible in the field. Any thoughts on how I can add this text. I am new to Arcade, so I assume it would be added in the IF statement Return line? i&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;link1&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="noopener"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;link2&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="noopener"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;link3&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="noopener"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&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;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt; == &lt;/SPAN&gt;&lt;SPAN&gt;"Type II (500 - 1,999 persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;link1&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&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;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt; == &lt;/SPAN&gt;&lt;SPAN&gt;"Type III (250 - 499 persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;link2&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If&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;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt; == &lt;/SPAN&gt;&lt;SPAN&gt;"Type IV (249 or fewer persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;link3&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 23:04:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247883#M49754</guid>
      <dc:creator>TimHayes3</dc:creator>
      <dc:date>2023-01-12T23:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247888#M49755</link>
      <description>&lt;P&gt;If you are trying to return the respective link based on the value of the RESOURCETYPE field (though in the example, all the links are the same so overkill):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var link1 = 'https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7'
var link2 = 'https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7'
var link3 = 'https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7'
if ($feature.RESOURCETYPE == "Type II (500 - 1,999 persons)"){
     return link1
     }
if ($feature.RESOURCETYPE == "Type III (250 - 499 persons)"){
    return link2
    }
If ($feature.RESOURCETYPE == "Type IV (249 or fewer persons)"){
    return link3
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 23:10:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247888#M49755</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-01-12T23:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247890#M49756</link>
      <description>&lt;P&gt;Yeah I saw that, I made a change, it's much cleaner:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt; &lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&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;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt; == &lt;/SPAN&gt;&lt;SPAN&gt;"Type II (500 - 1,999 persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&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;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt; == &lt;/SPAN&gt;&lt;SPAN&gt;"Type III (250 - 499 persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If&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;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt; == &lt;/SPAN&gt;&lt;SPAN&gt;"Type IV (249 or fewer persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt; &lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jan 2023 23:11:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247890#M49756</guid>
      <dc:creator>TimHayes3</dc:creator>
      <dc:date>2023-01-12T23:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247894#M49757</link>
      <description>&lt;P&gt;another way, works similar to IN&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var link = 'https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7'

var field= $feature.RESOURCETYPE

var arr = ["Type II (500 - 1,999 persons)","Type III (250 - 499 persons)", "Type IV (249 or fewer persons)"]

if (Includes(arr, field)){
    return link
}&lt;/LI-CODE&gt;&lt;P&gt;I use this method when there are a lot of comparisons, or I will be modifying it over time.&lt;/P&gt;&lt;P&gt;No need to create a bunch of other if statements, just add the values into the arr array.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 23:22:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247894#M49757</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-01-12T23:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247898#M49758</link>
      <description>&lt;P&gt;Excellent, that works too. Any idea how I can have hyperlink text instead of just the url as a value in the field? the syntax skips me at the moment. Example:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN&gt;var&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;A href="https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7" target="_blank" rel="nofollow noopener noreferrer"&gt;https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7&lt;/A&gt;'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;==&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Type II (500 - 1,999 persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt;;}&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;&amp;lt;-- what do I need to add here to include the text "Type II" hyperlinked to link?&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;==&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Type III (250 - 499 persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;If&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN&gt;$feature&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;RESOURCETYPE&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;==&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"Type IV (249 or fewer persons)"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;link&lt;/SPAN&gt;&lt;SPAN&gt;;}&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 12 Jan 2023 23:31:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247898#M49758</guid>
      <dc:creator>TimHayes3</dc:creator>
      <dc:date>2023-01-12T23:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247903#M49759</link>
      <description>&lt;P&gt;Not really sure, and not able to test, at least till next week or so, but I believe you will need to return an actual web link, not just the URL.&lt;/P&gt;&lt;P&gt;Something like this might work, but not sure how it will display in the popup.&amp;nbsp; will need to test:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var link = 'https://rtlt.preptoolkit.fema.gov/Public/Resource/ViewFile/9-508-1192?type=Pdf&amp;amp;s=Name&amp;amp;p=7'

var field= $feature.FEATURECODE

var arr = ["Type II (500 - 1,999 persons)","Type III (250 - 499 persons)", "Type IV (249 or fewer persons)"];
console(link)
if (Includes(arr, field)){
    var newlink = '&amp;lt;a href=' + link + 'target="_blank" rel="nofollow"&amp;gt;(&amp;lt;b&amp;gt;Click Here&amp;lt;/b&amp;gt;)&amp;lt;/a&amp;gt;'
    return newlink
}&lt;/LI-CODE&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 23:46:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247903#M49759</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-01-12T23:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247919#M49760</link>
      <description>&lt;P&gt;I changed var field = $feature.RESOURCETYPE and the output in the popup was this:&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;a href= + link + target="_blank" rel="nofollow"&amp;gt;(&amp;lt;b&amp;gt;Click Here&amp;lt;/b&amp;gt;)&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It seems to return newlink as a text output in the popup.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder if it is even possible to output hyperlink text in a popup. I know how to do this if the values in the field are the same, but my situation is conditional. I will keep you posted on what I find out over the next week or so. Rhett, if you, or anyone else knows how to do this I would be much appreciative. Thank you for the assistance you have provided so far.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 00:50:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247919#M49760</guid>
      <dc:creator>TimHayes3</dc:creator>
      <dc:date>2023-01-13T00:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247921#M49761</link>
      <description>&lt;P&gt;I know that if you use the first one I supplied above that just returns the URL, you can add that as a popup expression, then add the expression in the fields list of the popup.&amp;nbsp; This will give you a dynamic link that can use variable substitution to create the URL.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My example for testing (data I have), but still just returning the URL itself, not &amp;lt;a href/&amp;gt;:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var link = 'https://mygisorg.maps.arcgis.com/apps/webappviewer/index.html'

var field= $feature.Notes

var newlink = link + field 
return newlink
&lt;/LI-CODE&gt;&lt;P&gt;with the value of Notes field being the id (the rest of the URL) so they are concatenated to form final URL.&lt;/P&gt;&lt;P&gt;When added as a field in the popup, looks like:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RhettZufelt_0-1673571476625.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/60356iDA32582BD157C263/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RhettZufelt_0-1673571476625.png" alt="RhettZufelt_0-1673571476625.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And when I click on the "View", it opens the dynamically created URL in new window.&lt;/P&gt;&lt;P&gt;But, have not figured out a way, or if it is possible to have the returned link say what you want.&amp;nbsp; Might be stuck with&amp;nbsp; &amp;nbsp;"View", but at least you can 'build' the URL dynamically.&lt;/P&gt;&lt;P&gt;R_&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 01:02:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1247921#M49761</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2023-01-13T01:02:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variable is assigned but never used (Arcade Question)</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1248267#M49781</link>
      <description>&lt;P&gt;Rhett and Doug thank you for your assistance. I found what I needed in an earlier post from December:&amp;nbsp;&lt;A href="https://community.esri.com/t5/arcgis-online-questions/arcade-add-url-to-pop-up/m-p/1240570#M49331" target="_blank"&gt;https://community.esri.com/t5/arcgis-online-questions/arcade-add-url-to-pop-up/m-p/1240570#M49331&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 23:17:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/variable-is-assigned-but-never-used-arcade/m-p/1248267#M49781</guid>
      <dc:creator>TimHayes3</dc:creator>
      <dc:date>2023-01-13T23:17:38Z</dc:date>
    </item>
  </channel>
</rss>

