<?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 Use Arcade to add href hyperlinks to unique list in ArcGIS Online Developers Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368506#M1318</link>
    <description>&lt;P&gt;Hello community!&amp;nbsp;&amp;nbsp; I have a Field of unique coded values.&amp;nbsp; these unique codes reference a full URL in a Table. however for each Feature there could be multiple codes(that are separated by piping '|').&amp;nbsp; example: &lt;EM&gt;WoodOthers1948 | Barnes1953 | HailOthers1971&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;in the past,&amp;nbsp; I have hard coded the URLs to the codes and used HTML 'href' in the Arcade window to get my results,&amp;nbsp; however,&amp;nbsp; there are hundreds of these combinations.&lt;/P&gt;&lt;P&gt;I would like to have the attribute codes show in the popup and each individual code would be hyperlinked/href to their unique URL.&lt;/P&gt;&lt;P&gt;*this is visually how it should look in the popup,&amp;nbsp; but each coded value would be a unique hyperlink-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data Source: &lt;/STRONG&gt;WoodOthers1948 | Barnes1953 | HailOthers1971 | StevenOthers1974 | Condon1992 | CarrollOthers1999 | KirkhamNavarre2003 | CarrollOthers2014&lt;/P&gt;&lt;P&gt;I have thought of using 'Decode' to reassign the codes to URLs,&amp;nbsp; but not sure how to read the clicked $feature list in to assign those individual URLs each time.&lt;/P&gt;&lt;P&gt;Any help?&amp;nbsp; im assuming creating a unique Array will help, but accessing and href'ing each code correctly back to the coded text list is still an issue.&lt;/P&gt;&lt;P&gt;thx!&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jan 2024 18:34:48 GMT</pubDate>
    <dc:creator>Paco</dc:creator>
    <dc:date>2024-01-10T18:34:48Z</dc:date>
    <item>
      <title>Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368506#M1318</link>
      <description>&lt;P&gt;Hello community!&amp;nbsp;&amp;nbsp; I have a Field of unique coded values.&amp;nbsp; these unique codes reference a full URL in a Table. however for each Feature there could be multiple codes(that are separated by piping '|').&amp;nbsp; example: &lt;EM&gt;WoodOthers1948 | Barnes1953 | HailOthers1971&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;in the past,&amp;nbsp; I have hard coded the URLs to the codes and used HTML 'href' in the Arcade window to get my results,&amp;nbsp; however,&amp;nbsp; there are hundreds of these combinations.&lt;/P&gt;&lt;P&gt;I would like to have the attribute codes show in the popup and each individual code would be hyperlinked/href to their unique URL.&lt;/P&gt;&lt;P&gt;*this is visually how it should look in the popup,&amp;nbsp; but each coded value would be a unique hyperlink-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Data Source: &lt;/STRONG&gt;WoodOthers1948 | Barnes1953 | HailOthers1971 | StevenOthers1974 | Condon1992 | CarrollOthers1999 | KirkhamNavarre2003 | CarrollOthers2014&lt;/P&gt;&lt;P&gt;I have thought of using 'Decode' to reassign the codes to URLs,&amp;nbsp; but not sure how to read the clicked $feature list in to assign those individual URLs each time.&lt;/P&gt;&lt;P&gt;Any help?&amp;nbsp; im assuming creating a unique Array will help, but accessing and href'ing each code correctly back to the coded text list is still an issue.&lt;/P&gt;&lt;P&gt;thx!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 18:34:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368506#M1318</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-01-10T18:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368557#M1319</link>
      <description>&lt;P&gt;Here's one way of doing it. I'm using a table I set up that has the codes and their associated URLs. In the Arcade element, I get the codes from the feature (here I use a dummy variable in lieu of an actual feature), split them into an array, and loop through that array. For each code, I get the URL from the table and create an href, which is pushed into an array. That array is concatentated with the Data Source text.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var feat = 'WoodOthers1948 | Barnes1953 | HailOthers1971';
var source = FeatureSetByPortalItem(myPortal, myTableId,  0, ['Code', 'URL'], false)
var arr = Split(feat, " | ")
var output = []
for (var index in arr) {
  var code = arr[index]
  var pub = Filter(source, "Code = @code")
  var item  = `&amp;lt;a href="${First(pub).URL}"&amp;gt;${code}&amp;lt;/a&amp;gt;`
  Push(output, item)
}

return { 
	type : 'text', 
	text : `&amp;lt;b&amp;gt;Data Source:&amp;lt;/b&amp;gt; ${Concatenate(output, " | ")}`
}&lt;/LI-CODE&gt;&lt;P&gt;This returns this popup, with each link functional&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="popup8.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91114iFBA280E42235C2DA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="popup8.png" alt="popup8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 19:46:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368557#M1319</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-01-10T19:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368709#M1320</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;!&amp;nbsp;&amp;nbsp; Thank you!&amp;nbsp;&amp;nbsp; I just wasn't sure how to extract that array correctly,&amp;nbsp; this worked great.&amp;nbsp;&amp;nbsp; I just replaced your dummy variable list with my polygon $feature layer, and used an existing Table that included the Codes and URLs, and the array was built off that.&lt;/P&gt;&lt;P&gt;Thanks for looking at this so quickly.&amp;nbsp; it definitely takes an extra second to think when it needs to sort thru a longer array list,&amp;nbsp; but it outputs what I need!&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is an example of the new popup output, with active href links&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sources.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/91155i0D63C8786090595E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sources.png" alt="sources.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 10 Jan 2024 23:50:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368709#M1320</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-01-10T23:50:23Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368924#M1322</link>
      <description>&lt;P&gt;This isn't the most efficient code, so I can imagine it's slower with longer array lists. Since it has to make a query for each item in the list, multiple requests are sent back to the server. You might look at &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;'s blog about "&lt;A href="https://community.esri.com/t5/arcgis-online-blog/improving-expression-performance-a-custom-function/ba-p/1288785" target="_self"&gt;memorizing&lt;/A&gt;" the table and see if that makes a measurable difference.&lt;/P&gt;&lt;P&gt;You could also just read the table into a dictionary and use the code field as a key to get the URL value instead of using the Filter on the Table.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 15:02:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1368924#M1322</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-01-11T15:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1369010#M1323</link>
      <description>&lt;P&gt;Yep,&amp;nbsp; understood and agreed.&amp;nbsp; Code efficiency will need to be looked at.&amp;nbsp; However, your code definitely helped us get over that first hump,&amp;nbsp; and truly does not slow the popups down too much(2-3 seconds depending on the array list pulled, which can go up to about 10 Codes).&amp;nbsp;&amp;nbsp; For now,&amp;nbsp; our task has been automated,&amp;nbsp; thanks again.&amp;nbsp;&amp;nbsp; But yes,&amp;nbsp; we will look at the efficiency and update where needed..and your link to "Memorizing" is a terrific post, full of great ideas.&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;&lt;P&gt;p&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jan 2024 16:51:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1369010#M1323</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-01-11T16:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1510926#M1434</link>
      <description>&lt;P&gt;Hi Ken,&lt;/P&gt;&lt;P&gt;Thank you so much for sharing your example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have run into something that is making me crazy! The code below modeled after your example is being used in a popup Arcade element. Its basically looping through a table of images and I’m reformatting the string into a usable URL. It seems to work when I run it in the code window, but it fails to render the links in the popup. I think it has something to do with the loop but the text that is output in the run looks correct. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice? (see images below)&lt;/P&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;&lt;P&gt;var portal = Portal('&lt;A href="https://gis.clark.wa.gov/portalpw/" target="_blank"&gt;https://gis.clark.wa.gov/portalpw/&lt;/A&gt;')&lt;/P&gt;&lt;P&gt;var Stmdocs = FeatureSetByPortalItem(portal,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; "4b35b095430d47d699dea875e62dd0b6", 3, [ 'MmsId','FilePath']) //42 is the table ID in the service&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Filter related features by using a common attribute&lt;/P&gt;&lt;P&gt;// Here both table have identical MMSID fields&lt;/P&gt;&lt;P&gt;var MMSID = $feature.MmsId&lt;/P&gt;&lt;P&gt;var filterStatement = 'MMSID = @MMSID'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Related features as a variable&lt;/P&gt;&lt;P&gt;var relatedData = Filter(Stmdocs, filterStatement)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Sort related features by oldest to newest&lt;/P&gt;&lt;P&gt;var relatedDataSorted = OrderBy(relatedData, 'MmsId')&lt;/P&gt;&lt;P&gt;// Build the pop-up string by iterating through all related features ideally as hyperlinks&lt;/P&gt;&lt;P&gt;var thenewpath = ''&lt;/P&gt;&lt;P&gt;var theurl = ''&lt;/P&gt;&lt;P&gt;var output = []&lt;/P&gt;&lt;P&gt;for (var f in relatedDataSorted){&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; thenewpath = Replace(f.filepath, 'olympus', '')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; thenewpath = Replace(thenewpath, 'gisdata', '')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; thenewpath = Replace(thenewpath, 'Images', 'ccimages')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; thenewpath = Replace(thenewpath, '\\', '/')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; thenewpath = Replace(thenewpath, '////', '&lt;A href="https://gis.clark.wa.gov/" target="_blank"&gt;https://gis.clark.wa.gov/&lt;/A&gt;')&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; theurl = "&amp;lt;a href=" + TextFormatting.DoubleQuote + thenewpath + TextFormatting.DoubleQuote + "&amp;gt;Image&amp;lt;/a&amp;gt;"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; Push(output, theurl)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;return {&lt;/P&gt;&lt;P&gt;&amp;nbsp; type : 'text',&lt;/P&gt;&lt;P&gt;&amp;nbsp; text : `&amp;lt;b&amp;gt;Image Links:&amp;lt;/b&amp;gt; ${Concatenate(output, TextFormatting.NewLine)}`&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GeoFinn_0-1722036093673.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110838i3B5D0BD5FC7DB317/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GeoFinn_0-1722036093673.png" alt="GeoFinn_0-1722036093673.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="GeoFinn_1-1722036093677.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/110839i725DD6FBD811ED6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GeoFinn_1-1722036093677.png" alt="GeoFinn_1-1722036093677.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2024 23:25:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1510926#M1434</guid>
      <dc:creator>GeoFinn</dc:creator>
      <dc:date>2024-07-26T23:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1511586#M1435</link>
      <description>&lt;P&gt;That code should work. Did you check whether you're getting any valid related records? It would be something like this (untested)&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var portal = Portal("https://gis.clark.wa.gov/portalpw/");
var Stmdocs = FeatureSetByPortalItem(portal, "4b35b095430d47d699dea875e62dd0b6", 3, ["MmsId", "FilePath"]); //42 is the table ID in the service

// Filter related features by using a common attribute
// Here both table have identical MMSID fields

var MMSID = $feature.MmsId;
var filterStatement = "MMSID = @MMSID";
// Related features as a variable
var relatedData = Filter(Stmdocs, filterStatement);
var output = 'No images found'
if (Count(relatedData) &amp;gt; 0) {
  // Sort related features by oldest to newest
  var relatedDataSorted = OrderBy(relatedData, "MmsId");
  // Build the pop-up string by iterating through all related features ideally as hyperlinks
  var thenewpath = "";
  var theurl = "";
  var list = [];
  for (var f in relatedDataSorted) {
    thenewpath = Replace(f.filepath, "olympus", "");
    thenewpath = Replace(thenewpath, "gisdata", "");
    thenewpath = Replace(thenewpath, "Images", "ccimages");
    thenewpath = Replace(thenewpath, "\\", "/");
    thenewpath = Replace(thenewpath, "////", "https://gis.clark.wa.gov/");
    theurl = `&amp;lt;a href="${thenewpath}"&amp;gt;Image&amp;lt;/a&amp;gt;`;

    Push(list, theurl);
  }
  output = `&amp;lt;b&amp;gt;Image Links:&amp;lt;/b&amp;gt; ${Concatenate(list, TextFormatting.NewLine)}`;
}

return {
  type: "text",
  text: output
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 14:09:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1511586#M1435</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-07-29T14:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1563903#M1518</link>
      <description>&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;Hello again&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp; and thanks again for the array to href code!&lt;/P&gt;&lt;P&gt;now I am building another JS(4.x) application using expressionInfos, and cannot seem to retrieve the related Table records to href those returns?&amp;nbsp; &amp;nbsp;I can see the Feature array('dsource') just fine(image one) but I only get "object,FeatureSet" after trying to Filter the table('pub')..albeit the correct number of objects shows.&lt;/P&gt;&lt;P&gt;any help here?&amp;nbsp; the straight Arcade script you helped build works fine in a similar scenario using a MapView.&amp;nbsp; but this time I am accessing the Table using FeatureSetByPortalItem,&amp;nbsp; which shows the correct number of object rows so im assuming I am accessing correctly?&lt;/P&gt;&lt;P&gt;Im trying to relate the Table "DataSources_ID" with the Features "DataSourceID" and finally href the "URL" to the "DataSourcesID".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;expressionInfos&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;SPAN&gt; [{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"SourceExpression"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;title&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"Data Sources Title"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;expression&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;`&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; var table = FeatureSetByPortalItem(Portal("&lt;A href="https://portalname" target="_blank"&gt;https://portalname&lt;/A&gt;"), "d6260270918c477e9a76ee44ba0c145e", 1, ['DataSources_ID', 'URL'], false)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; var sources = $feature.DataSourceID&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; var arr = Split(sources, "|")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; var output = []&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;for (var i in arr) {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var dsource = arr[i]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; var pub = Filter(table, "DataSources_ID = @dsource");&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; // &amp;nbsp;var link &amp;nbsp;= &amp;lt;a href="{First(pub).URL}"&amp;gt;{dsource}&amp;lt;/a&amp;gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; push(output, pub)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; return Concatenate(output,TextFormatting.NewLine)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; `&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;}]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&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="Paco_0-1733178979228.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120690i7B5E1CDAD64C9217/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Paco_0-1733178979228.png" alt="Paco_0-1733178979228.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Paco_1-1733179029219.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120691i03655A54E961BCE1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Paco_1-1733179029219.png" alt="Paco_1-1733179029219.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 22:45:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1563903#M1518</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-12-02T22:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564121#M1519</link>
      <description>&lt;P&gt;When posting code, please use the "&lt;A href="https://community.esri.com/t5/python-blog/code-formatting-the-community-version/ba-p/1007633#U1007633" target="_self"&gt;Insert/Edit code sample&lt;/A&gt;" button. It makes it easier to read and refer to line numbers.&lt;/P&gt;&lt;P&gt;You're pushing a FeatureSet into the output array. You have to loop through the records in that FeatureSet and push each link into it.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;for (var i in arr) {
  var dsource = arr[i]
  var pub = Filter(table, "DataSources_ID = @dsource");
  // var link  = &amp;lt;a href="{First(pub).URL}"&amp;gt;{dsource}&amp;lt;/a&amp;gt;
  // push(output, pub)
  for (var f in pub) {
    push(output, `&amp;lt;a href="${f.URL}"&amp;gt;${dsource}&amp;lt;/a&amp;gt;`
  }
}&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 03 Dec 2024 15:54:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564121#M1519</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-12-03T15:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564139#M1520</link>
      <description>&lt;P&gt;Woops!&amp;nbsp; sorry about the pasting,&amp;nbsp; must have just kept pasting after i pasted the images.&lt;/P&gt;&lt;P&gt;thx again for the reply.&amp;nbsp; I understand your response,&amp;nbsp; but I think im having some formatting issues because I am getting JS errors in Visual Studio from the backticks in the Push statement?(image 1)&lt;/P&gt;&lt;P&gt;Ive had these before.&amp;nbsp; &amp;nbsp;these errors do NOT show up when using the Arcade Expressions in AGOL,&amp;nbsp; but in my JS they seem to give me errors.&amp;nbsp; also the "$" i typically use seems to be read differently in standalone JS in certain places?&lt;/P&gt;&lt;P&gt;as you can see,&amp;nbsp; I use backticks in the beginning and end of my expression:, then I want to add the backticks again in the final href expression,&amp;nbsp; but the compiler does not like this.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Paco_0-1733242935451.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120737i3796BE66D446806F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Paco_0-1733242935451.png" alt="Paco_0-1733242935451.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;   expressionInfos: [{
    name: "SourceExpression",
    title: "Data Sources Title",
    expression: `
    var table = FeatureSetByPortalItem(Portal("https://portalurl"), "d6260270918c477e9a76ee44ba0c145e", 1, ['DataSources_ID', 'URL'], false)
    var sources = $feature.DataSourceID
    var arr = Split(sources, "|")
    var output = []

     for (var i in arr) {
      var dsource = arr[i]
      var pub = Filter(table, "DataSources_ID = dsource");
      //  var link  = &amp;lt;a href="{First(pub).URL}"&amp;gt;{dsource}&amp;lt;/a&amp;gt;
      //push(output, dsource)
      for (var f in pub) {
        push(output, `&amp;lt;a href="${f.URL}"&amp;gt;${dsource}&amp;lt;/a&amp;gt;`
      }
    }

    return Concatenate(output,TextFormatting.NewLine)

    `
   }]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 16:31:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564139#M1520</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-12-03T16:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564231#M1521</link>
      <description>&lt;P&gt;My apologies, I left off the closing parenthesis&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;push(output, `&amp;lt;a href="${f.URL}"&amp;gt;${dsource}&amp;lt;/a&amp;gt;`);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 18:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564231#M1521</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-12-03T18:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564246#M1522</link>
      <description>&lt;P&gt;I saw that and added the parens,&amp;nbsp; but that really wasn't the issue.&amp;nbsp; &amp;nbsp;I must have some 'open' code somewhere,&amp;nbsp; because it just doesn't like the backticks within another backtick group.&amp;nbsp; &amp;nbsp;the errors still persist.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;it shows " ',' expected" errors in VisualStudio and the console also shows "Uncaught SyntaxError: Unexpected identifier 'href' ".&lt;/P&gt;&lt;P&gt;so it's struggling with those backticks.&amp;nbsp; &amp;nbsp;I really believe this would all work if i can figure out why that syntax is giving me errors.&lt;/P&gt;&lt;P&gt;also, if I remove the backticks from the start/end of the "expression:"&amp;nbsp; it can't read the first 'var' declaration. "Uncaught SyntaxError: Unexpected token 'var' "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thx!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 18:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564246#M1522</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-12-03T18:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564269#M1523</link>
      <description>&lt;P&gt;OK, I see what's going on. I overlooked the fact that this is in an expression where you're already using backticks. Try this instead&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;push(output, '&amp;lt;a href="' + f.URL + '"&amp;gt;${dsource}&amp;lt;/a&amp;gt;');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 19:14:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564269#M1523</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-12-03T19:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564388#M1525</link>
      <description>&lt;P&gt;Hm.&amp;nbsp; just returning a blank entry now.&amp;nbsp; &amp;nbsp;and again the "$" before the 'dsource' is throwing a "Uncaught ReferenceError: dsource is not defined".&amp;nbsp; &amp;nbsp;and if i remove that "$" it just returns blank with no error.&lt;/P&gt;&lt;P&gt;this syntax is getting frustrating..since I know your code has worked in the past &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 21:06:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564388#M1525</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-12-03T21:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564398#M1526</link>
      <description>&lt;P&gt;UPDATE.&amp;nbsp; &amp;nbsp;okay,&amp;nbsp; I am now returning the correct number of entries and the correct URLs.&amp;nbsp; &amp;nbsp;but the return is returning as a string between the href single quotes..&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Paco_0-1733260602100.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120815i45C3696B952DA81C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Paco_0-1733260602100.png" alt="Paco_0-1733260602100.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I believe i was missing the "@" symbol for the Filter variable(@dsource)&lt;/P&gt;&lt;P&gt;gettin close!...&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 21:19:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564398#M1526</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-12-03T21:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564416#M1527</link>
      <description>&lt;P&gt;Urgh...I'm not concentrating hard enough today&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;push(output, '&amp;lt;a href="' + f.URL + '"&amp;gt;' + dsource + '&amp;lt;/a&amp;gt;');&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 21:35:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564416#M1527</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-12-03T21:35:04Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564423#M1528</link>
      <description>&lt;P&gt;Again,&amp;nbsp; sooooo close!&amp;nbsp; &amp;nbsp;im still getting that full string between the single quotes?&amp;nbsp; &amp;nbsp;..but it is adding the 'dsource' correctly now&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; &amp;nbsp; just need to get the string to be read as html and we'd be in business!&amp;nbsp; &amp;nbsp;..this is exciting(for me at least!).&amp;nbsp; &amp;nbsp;this is where i wished those literal backticks would work..?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Paco_0-1733262023761.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120821iD946BF2D1C5F4CF2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Paco_0-1733262023761.png" alt="Paco_0-1733262023761.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 21:43:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564423#M1528</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-12-03T21:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564454#M1529</link>
      <description>&lt;P&gt;Usually links get sanitized with a simple return, which is why you have to use an Arcade element with popups for html elements.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 22:38:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564454#M1529</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-12-03T22:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Use Arcade to add href hyperlinks to unique list</title>
      <link>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564487#M1530</link>
      <description>&lt;P&gt;Well not exactly sure what your response exactly means,&amp;nbsp; but in this Return the href links are active and exactly what I need,&amp;nbsp; but the type of text return format is not what im looking for.&lt;/P&gt;&lt;P&gt;is there a way to remove the default Table formatting and return a plain text datatype and keep the active links?&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; return {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; output&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Paco_0-1733268026011.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/120831i895A7F629A443A1C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Paco_0-1733268026011.png" alt="Paco_0-1733268026011.png" /&gt;&lt;/span&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Dec 2024 23:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-developers-questions/use-arcade-to-add-href-hyperlinks-to-unique-list/m-p/1564487#M1530</guid>
      <dc:creator>Paco</dc:creator>
      <dc:date>2024-12-03T23:22:24Z</dc:date>
    </item>
  </channel>
</rss>

