<?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 code help. Add prefix, suffix, and new line and parse by comma in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/arcade-code-help-add-prefix-suffix-and-new-line/m-p/1099625#M6012</link>
    <description>&lt;P&gt;Not too sure on the newline.&amp;nbsp; re prefix and suffix, I don't know if I'm missing something so apologies if I've misunderstood.&lt;/P&gt;&lt;P&gt;edit, maybe try just + '\n' also or '\r\n' or&amp;nbsp;&lt;SPAN&gt;"\x0d\x0a" -&amp;nbsp;&lt;A href="https://community.esri.com/t5/developers-questions/arcade-text-constant-for-textformatting-newline-is/td-p/709762" target="_blank"&gt;Solved: Arcade Text Constant for TextFormatting.NewLine is... - Esri Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;permits[index] = 'https://asbuilts.ci.missoula.mt.us/scards/' + permit["PermitNumber"] + '.pdf'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Sep 2021 16:32:33 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2021-09-18T16:32:33Z</dc:date>
    <item>
      <title>Arcade code help. Add prefix, suffix, and new line and parse by comma</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-code-help-add-prefix-suffix-and-new-line/m-p/1099565#M6011</link>
      <description>&lt;P&gt;Hi folks, I have an Arcade attribute expression puzzler.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A bit of background, I've created an attribute expression to display "Permit Numbers" from a related table in the feature service pop-up.&amp;nbsp; My only problem is that I need to add the URL prefix and suffix to those numbers to create the hyperlink as well as a NewLine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//code sample&lt;/P&gt;&lt;P&gt;//Attempt 2&lt;BR /&gt;//join field id&lt;BR /&gt;var id = $feature.ParcelID;&lt;BR /&gt;var relatedtable = FeatureSetById($datastore, "1");&lt;BR /&gt;var filtereddata = Filter(relatedtable, "ParcelID = @id");&lt;BR /&gt;var permits = []&lt;BR /&gt;var index = 0;&lt;BR /&gt;for (var permit in filtereddata) {&lt;BR /&gt;permits[index] = permit["PermitNumber"];&lt;BR /&gt;index++;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;return Concatenate(permits, ',')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//result pop-up&lt;/P&gt;&lt;TABLE cellspacing="0px" cellpadding="0px"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Permit Numbers&lt;/TD&gt;&lt;TD&gt;2013-MSS-SWR-00211,EXC120338,EXC02-1861,EXC052208,2016-MSS-SWR-00488,13928,21394,2013-MSS-EXC-00009,2013-MSS-EXC-00305,2016-MSS-EXC-00742,2016-MSS-EXC-00743&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;//new format needed&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;A href="https://asbuilts.ci.missoula.mt.us/scards/" target="_blank" rel="noopener"&gt;https://asbuilts.ci.missoula.mt.us/scards/&lt;/A&gt;&lt;/U&gt;&lt;EM&gt;2013-MSS-SWR-00211&lt;/EM&gt;&lt;U&gt;.pdf&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;A href="https://asbuilts.ci.missoula.mt.us/scards/" target="_blank" rel="noopener"&gt;https://asbuilts.ci.missoula.mt.us/scards/&lt;/A&gt;&lt;/U&gt;&lt;EM&gt;EXC120338&lt;/EM&gt;&lt;U&gt;.pdf&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 21:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-code-help-add-prefix-suffix-and-new-line/m-p/1099565#M6011</guid>
      <dc:creator>JohnDriessen</dc:creator>
      <dc:date>2021-09-17T21:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade code help. Add prefix, suffix, and new line and parse by comma</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-code-help-add-prefix-suffix-and-new-line/m-p/1099625#M6012</link>
      <description>&lt;P&gt;Not too sure on the newline.&amp;nbsp; re prefix and suffix, I don't know if I'm missing something so apologies if I've misunderstood.&lt;/P&gt;&lt;P&gt;edit, maybe try just + '\n' also or '\r\n' or&amp;nbsp;&lt;SPAN&gt;"\x0d\x0a" -&amp;nbsp;&lt;A href="https://community.esri.com/t5/developers-questions/arcade-text-constant-for-textformatting-newline-is/td-p/709762" target="_blank"&gt;Solved: Arcade Text Constant for TextFormatting.NewLine is... - Esri Community&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;permits[index] = 'https://asbuilts.ci.missoula.mt.us/scards/' + permit["PermitNumber"] + '.pdf'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2021 16:32:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-code-help-add-prefix-suffix-and-new-line/m-p/1099625#M6012</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-09-18T16:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade code help. Add prefix, suffix, and new line and parse by comma</title>
      <link>https://community.esri.com/t5/developers-questions/arcade-code-help-add-prefix-suffix-and-new-line/m-p/1099787#M6013</link>
      <description>&lt;LI-CODE lang="javascript"&gt;var id = $feature.ParcelID;
var relatedtable = FeatureSetById($datastore, "1");
var filtereddata = Filter(relatedtable, "ParcelID = @id");
var permits = []

var url_pre = "https://asbuilts.ci.missoula.mt.us/scards/"
var url_post = ".pdf"
for (var permit in filtereddata) {
  permits[Count(permits)] = url_pre + permit["PermitNumber"] + url_post
  // in ArcGIS Pro 2.8 or later you can do
  // Push(permits, url_pre + permit["PermitNumber"] + url_post)
}

// if you show the popup's normal attribute table, one of these should work
return Concatenate(permits, TextFormatting.NewLine)
return Concatenate(permits, "\n")
// if you show custom HTML code, this should work
return Concatenate(permits, "&amp;lt;br/&amp;gt;")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note that there is currently no easy way for the popup to actually format those urls as links. Your users will have to copy/paste them.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 06:19:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/arcade-code-help-add-prefix-suffix-and-new-line/m-p/1099787#M6013</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2021-09-20T06:19:39Z</dc:date>
    </item>
  </channel>
</rss>

