<?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: Arcade reference to external sources in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004445#M37502</link>
    <description>&lt;P&gt;Xander,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes the first comment/question is correct.&lt;/P&gt;&lt;P&gt;The reason why I want a loop is because there are several resources/polygons stacked on one another. I want to return all of them that are within a click. I'm not sure if that answers the second statement correctly. I will try the first function and see what I come up with.&lt;/P&gt;&lt;P&gt;Yes, that is the correct URL I am looking for.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Nov 2020 20:55:03 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-11-24T20:55:03Z</dc:date>
    <item>
      <title>Arcade reference to external sources</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004062#M37485</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;I need some help with this code since I am new to coding.&lt;/P&gt;&lt;P&gt;I have created a custom pop-up that allows me to gather information through intersecting.&lt;/P&gt;&lt;P&gt;Now I wanted to get to the next level-creating links with intersecting. I created two separate arcade expressions;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One for the intersection:&amp;nbsp;&lt;/P&gt;&lt;P&gt;var intersectLayer =Intersects(FeaturesetbyName($map, "landrecords - Parcel Map"), $feature)&lt;BR /&gt;var results = ""&lt;BR /&gt;var baseweb ="&lt;A title="http://pw.lacounty.gov/sur/nas/landrecords/parcel/pm%22" href="http://pw.lacounty.gov/sur/nas/landrecords/parcel/PM%22" target="_blank" rel="noreferrer noopener"&gt;http://pw.lacounty.gov/sur/nas/landrecords/parcel/PM"&lt;/A&gt;&lt;BR /&gt;for (var f in intersectLayer){​​​&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (results ==""){​​​&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;results = f.Reference;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}​​​ &amp;nbsp;&amp;nbsp;else{​​​&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;results += ", " + f.Reference;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}​​​&lt;BR /&gt;}​​​&lt;BR /&gt;return results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One for the hyperlink:&lt;/P&gt;&lt;DIV&gt;var baseweb = "&lt;A href="http://pw.lacounty.gov/sur/nas/landrecords/parcel/PM" target="_blank" rel="noopener"&gt;http://pw.lacounty.gov/sur/nas/landrecords/parcel/PM&lt;/A&gt;"&lt;BR /&gt;var intersectLayer = Intersects(FeaturesetbyName($map, "landrecords - Parcel Map"), $feature)&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;for (var f in intersectLayer){​​&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return baseweb + MID(f.REFERENCE,2,3) + "/" + f.REFERENCE + ".pdf"&lt;BR /&gt;}​​&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Results:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;The result is circled in blue, however the links both send you to the same document.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 882px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/829i92D4E8A52D9E2B9F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Matthew&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 23 Nov 2020 18:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004062#M37485</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-11-23T18:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade reference to external sources</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004429#M37501</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous User&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A couple of comments/questions on what you are trying to achieve:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I assume that the first expression creates the text (comma separated list of "References") and the second the hyperlink. Is that correct?&lt;/LI&gt;&lt;LI&gt;You should not use a return statement in a loop in case you want to return only the first item. Return inside a loop will return with the first element. You can use the "First" function to get the first feature from the intersection results and simply read out the attribute you need.&lt;/LI&gt;&lt;LI&gt;The hyperlink that is returned will be something like "&lt;SPAN&gt;&lt;A href="http://pw.lacounty.gov/sur/nas/landrecords/parcel/PM346/12346579.pdf" target="_blank" rel="noopener"&gt;http://pw.lacounty.gov/sur/nas/landrecords/parcel/PM345/123456789.pdf&lt;/A&gt;&lt;/SPAN&gt;" if the reference value is&amp;nbsp;"123456789". Is that the correct URL you are looking for?&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Tue, 24 Nov 2020 20:42:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004429#M37501</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-11-24T20:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade reference to external sources</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004445#M37502</link>
      <description>&lt;P&gt;Xander,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes the first comment/question is correct.&lt;/P&gt;&lt;P&gt;The reason why I want a loop is because there are several resources/polygons stacked on one another. I want to return all of them that are within a click. I'm not sure if that answers the second statement correctly. I will try the first function and see what I come up with.&lt;/P&gt;&lt;P&gt;Yes, that is the correct URL I am looking for.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 20:55:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004445#M37502</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-11-24T20:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade reference to external sources</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004454#M37503</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous User&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for clarifying!&amp;nbsp;&lt;/P&gt;&lt;P&gt;You mention that you want to retrieve multiple hyperlinks since there can be multiple resources stacked on one another. A couple of things to keep in mind:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;To return multiple results from a single expression, you can use the same logic as for the list of references (in each loop add a value to the result)&lt;/LI&gt;&lt;LI&gt;However, if a single text contains multiple URLs, it will not appear as valid URL in the pop-up&lt;/LI&gt;&lt;LI&gt;If each feature provides a single URL in the pop-up the fact that they are stacked does not yield any problems.&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;On the other hand, you mentioned earlier that you obtain the same URL for different features. I don't see a reason for this in the Arcade expression and I would first look at the data and try some different URL's manually in the browser to see what happens and that there is no redirect causing this behavior.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 21:20:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/arcade-reference-to-external-sources/m-p/1004454#M37503</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2020-11-24T21:20:41Z</dc:date>
    </item>
  </channel>
</rss>

