<?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 Expression with HTML, TextFormating.NewLine doesn't work ? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357251#M37880</link>
    <description>&lt;P&gt;I use actually the return things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The point is this : I have a function to get all of my transaction associated at one building (relationship class between building shape and transaction table).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is the code :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var transactions = FeatureSetByRelationshipName($feature,"SDE.TRANSACTIONS")
var info = ''
for (var f in transactions){
    info += "ID : " + DefaultValue(f.TRA_ADR_ID, 'no data') + TextFormatting.NewLine +
       "Nom immeuble : " +
        DefaultValue(f.TRA_NOM_IMMEUBLE, 'no data') + TextFormatting.NewLine +
        "Montant : " + 
        DefaultValue(f.TRA_MONTANT, 'no data') + TextFormatting.NewLine +
        "Acquéreur : " +
        DefaultValue(f.TRA_ACQUEREUR, 'no data') + TextFormatting.NewLine + TextFormatting.NewLine
}&lt;/LI-CODE&gt;&lt;P&gt;On one building i can have N transactions associated, so when I click on my pop-up of the building shape, i can see all of the transaction associated, and all of the variables on the transaction are separated by a "TextFormatting.NewLine" to make a line break between variable so the information it show like that :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JasonBOCQUET_0-1701849837045.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88131iD573B53337521E74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JasonBOCQUET_0-1701849837045.png" alt="JasonBOCQUET_0-1701849837045.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and between each transaction, i would make a line break to have a more airy text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i think the HTML have to be integrate directly in the function who recover my transaction information (so the part of the code that i share to you in this post) no ? But it is possible to do that ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On your previous exemple, you can't parameter the HTML on the contents of the expression that you write, it's only on the expression himself when it called.&lt;/P&gt;&lt;P&gt;Because I try your thing, and all of my transaction are packed like this :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JasonBOCQUET_1-1701850114755.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88132iBE5BB99C889509C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JasonBOCQUET_1-1701850114755.png" alt="JasonBOCQUET_1-1701850114755.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is the code :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var transactions = FeatureSetByRelationshipName($feature,"SDE.TRANSACTIONS")
var info = ''
for (var f in transactions){
    info += "ID : " + DefaultValue(f.TRA_ADR_ID, 'no data') + TextFormatting.NewLine +
       "Nom immeuble : " +
        DefaultValue(f.TRA_NOM_IMMEUBLE, 'no data') + TextFormatting.NewLine +
        "Montant : " + 
        DefaultValue(f.TRA_MONTANT, 'no data') + TextFormatting.NewLine +
        "Acquéreur : " +
        DefaultValue(f.TRA_ACQUEREUR, 'no data') + TextFormatting.NewLine + TextFormatting.NewLine
}

var newVariable = iif(isempty(info),'Pas de transactions',info);

HTML += `&amp;lt;p style="text-align: left;"&amp;gt;&amp;lt;span style="font-size: 16px; font-family: Calibri, sans-serif;"&amp;gt;&amp;lt;em&amp;gt;&amp;lt;strong&amp;gt;${newVariable}&amp;lt;br&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`

return { 
	type : 'text', 
	text : HTML
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe i miss something in your explanation but i didn't get the point of the utility of the backticks notation to resolve my problem ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Dec 2023 08:10:23 GMT</pubDate>
    <dc:creator>JasonBOCQUET</dc:creator>
    <dc:date>2023-12-06T08:10:23Z</dc:date>
    <item>
      <title>Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356710#M37845</link>
      <description>&lt;P&gt;Hello, I have an attribute expression like this :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var transactions = FeatureSetByRelationshipName($feature,"SDE.TRANSACTIONS")
//return transactions
 
// Build the pop-up string by iterating through all related features
var info = ''
for (var f in transactions){
    info += "ID : " + DefaultValue(f.TRA_ADR_ID, 'no data') + TextFormatting.NewLine +
        "Nom immeuble : " +
        DefaultValue(f.TRA_NOM_IMMEUBLE, 'no data') + TextFormatting.NewLine +
        "Montant : " + 
        DefaultValue(f.TRA_MONTANT, 'no data') + TextFormatting.NewLine +
        "Acquéreur : " +
        DefaultValue(f.TRA_ACQUEREUR, 'no data') + TextFormatting.NewLine + TextFormatting.NewLine 
}
iif(isempty(info),'Pas de transactions','Transactions utilisateurs :'+TextFormatting.NewLine +TextFormatting.NewLine+info)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it returns me that :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JasonBOCQUET_0-1701771456532.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/87999iED3BE425E61CBA10/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JasonBOCQUET_0-1701771456532.png" alt="JasonBOCQUET_0-1701771456532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's good for me but i want to improve my pop-up windows with some HTML.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I try this code (it's only a short part of the code) :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var transactions = FeatureSetByRelationshipName($feature,"SDE.TRANSACTIONS")
var info = ''
for (var f in transactions){
    info += "ID : " + DefaultValue(f.TRA_ADR_ID, 'no data') + TextFormatting.NewLine +
       "Nom immeuble : " +
        DefaultValue(f.TRA_NOM_IMMEUBLE, 'no data') + TextFormatting.NewLine +
        "Montant : " + 
        DefaultValue(f.TRA_MONTANT, 'no data') + TextFormatting.NewLine +
        "Acquéreur : " +
        DefaultValue(f.TRA_ACQUEREUR, 'no data') + TextFormatting.NewLine + TextFormatting.NewLine
}


HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif;'&amp;gt;"+"&amp;lt;strong&amp;gt;"+iif(isempty(info),'Pas de transactions',TextFormatting.NewLine +TextFormatting.NewLine+info)+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it returns me this :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JasonBOCQUET_1-1701771620030.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88000iF10DF1432B9365F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JasonBOCQUET_1-1701771620030.png" alt="JasonBOCQUET_1-1701771620030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the TextFormatting.NewLine constants do not work in the arcade window but only in the attribute expressions window? Or did I make a mistake in my code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 10:23:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356710#M37845</guid>
      <dc:creator>JasonBOCQUET</dc:creator>
      <dc:date>2023-12-05T10:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356764#M37848</link>
      <description>&lt;P&gt;If you're going to be returning HTML in the Arcade popup element, you need to use template literals (so enclose your variable HTML in&amp;nbsp; backticks (`) instead of quotes ("), and then use the HTML tag &amp;lt;br&amp;gt; instead of textformatting.newline. Then, remove all the plus signs and enclose your variables in brackets preceeded by a $.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var transactions = FeatureSetByRelationshipName($feature,"SDE.TRANSACTIONS")
var info = ''
for (var f in transactions){
    info += "ID : " + DefaultValue(f.TRA_ADR_ID, 'no data') + TextFormatting.NewLine +
       "Nom immeuble : " +
        DefaultValue(f.TRA_NOM_IMMEUBLE, 'no data') + TextFormatting.NewLine +
        "Montant : " + 
        DefaultValue(f.TRA_MONTANT, 'no data') + TextFormatting.NewLine +
        "Acquéreur : " +
        DefaultValue(f.TRA_ACQUEREUR, 'no data') + TextFormatting.NewLine + TextFormatting.NewLine
}

HTML += `&amp;lt;p style="text-align: left;"&amp;gt;&amp;lt;span style="font-size: 16px; font-family: Calibri, sans-serif;"&amp;gt;&amp;lt;strong&amp;gt;${iif(isempty(info),'Pas de transactions'},&amp;lt;br&amp;gt; &amp;lt;br&amp;gt;${info})&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Give that a try and see if it works, though there might still be issues with the HTML return portion&amp;nbsp;${iif(isempty(info),'Pas de transactions'},&amp;lt;br&amp;gt; &amp;lt;br&amp;gt;${info}). You may want to assign that to it's own variable, and then just use that new one in the final HTML return so it would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var newVariable = iif(isempty(info),'Pas de transactions',info);

HTML += `&amp;lt;p style="text-align: left;"&amp;gt;&amp;lt;span style="font-size: 16px; font-family: Calibri, sans-serif;"&amp;gt;&amp;lt;strong&amp;gt;${newVariable}&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 13:47:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356764#M37848</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2023-12-05T13:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356782#M37849</link>
      <description>&lt;P&gt;Just a note: HTML generated by Arcade will &lt;EM&gt;only &lt;/EM&gt;work using the Arcade popup element.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/part-1-introducing-arcade-pop-up-content-elements/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/part-1-introducing-arcade-pop-up-content-elements/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You might check out using the Arcade element to return a field list, too. Takes care of some of the styling and formatting for youl&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 14:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356782#M37849</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-12-05T14:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356873#M37853</link>
      <description>&lt;P&gt;Thanks for your replies both of you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand one thing, i can use the HTML with Arcade like i write here :&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var immeuble = $feature.lp_nom_immeuble
var id_lp = $feature.id_lp
var adresse = $feature.lp_num_voie + ', ' + $feature.lp_nom_voie + ' ' + $feature.lp_code_postal + ' ' + $feature.lp_ville
var surface = $feature.lp_surface_totale
var construction = $feature.periode_de_construction
var etat = $feature.etat_general
var nature = $feature.destination_principale
var loyer = $feature.loyer_moyen
var vacance = $feature.taux_de_vacance
var offre = $feature.offre_en_cours

var HTML = "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;span style='font-size: 30px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+iif(IsEmpty(immeuble),'',immeuble)+"&amp;lt;/span&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(id_lp),"Pas d'ID Logipro","ID Logipro : "+id_lp)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;span style='font-size: 16px; color: rgb(1, 42, 132);'&amp;gt;"+adresse+"&amp;lt;/span&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+iif(surface &amp;lt; 1,"Pas de surface renseignée","Surface de "+"&amp;lt;strong&amp;gt;"+surface+" m²")+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+iif(construction &amp;lt; 1,"Pas d'année de construction renseignée","Année de construction : "+"&amp;lt;strong&amp;gt;"+construction)+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(etat),"Pas d'état renseigné","État de l'immeuble : "+"&amp;lt;strong&amp;gt;"+etat)+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(nature),"Pas de nature d'immeuble renseigné","Nature de l'immeuble : "+"&amp;lt;strong&amp;gt;"+nature)+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+iif(loyer &amp;lt; 1,"Pas de loyer moyen renseigné","Loyer moyen de "+"&amp;lt;strong&amp;gt;"+loyer+" €/m²/an")+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(vacance),"Pas de taux de vacance renseigné","Taux de vacance de "+"&amp;lt;strong&amp;gt;"+(Round(vacance, 4)*100)+"%")+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: left;'&amp;gt;&amp;lt;span style='font-size: 16px; font-family: Calibri, sans-serif; color: rgb(1, 42, 132);'&amp;gt;"+"Offre en cours : "+"&amp;lt;strong&amp;gt;"+offre+"&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += "&amp;lt;p style='text-align: center;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif; font-size: 20px; color: rgb(1, 42, 132);'&amp;gt;&amp;lt;strong&amp;gt;Transactions utilisateurs&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to build a pop-up like this :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JasonBOCQUET_0-1701791481651.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88044i9731874F1AC3FE57/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JasonBOCQUET_0-1701791481651.png" alt="JasonBOCQUET_0-1701791481651.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And it works, all of the code that I write works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So why I have to use backticks and &amp;lt;br&amp;gt; for that if everything else works ?&lt;/P&gt;&lt;P&gt;Can I only use this replacement to make a line break or it's mandatory to change all of my code ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/80456"&gt;@ZachBodenner&lt;/a&gt;&amp;nbsp;I try your code but it doesn't change anything, I don't understand what I have to make in &amp;lt;br&amp;gt; tags ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 15:59:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1356873#M37853</guid>
      <dc:creator>JasonBOCQUET</dc:creator>
      <dc:date>2023-12-05T15:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357011#M37868</link>
      <description>&lt;P&gt;First, I tried this (plugging your Arcade into my own data)&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var PID = $feature.PID
var HTML = ``
//var newVariable = IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)
//HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID+TextFormatting.NewLine+$feature.Address)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
//HTML += `&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"${newVariable}&amp;lt;br&amp;gt;${$feature.ADDRESS}"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`
HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"

return HTML&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The expression validates but doesn't actually return anything in my Arcade popup element. So then I tried to plug the variable HTML into the arcade return that exists when you add a new Arcade popup element:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var PID = $feature.PID
var HTML = ``
//var newVariable = IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)
//HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID+TextFormatting.NewLine+$feature.Address)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
//HTML += `&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"${newVariable}&amp;lt;br&amp;gt;${$feature.ADDRESS}"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`
HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"

//return HTML

return { 
	type : 'text', 
	text : HTML 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That got me somewhere:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_0-1701799728651.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88083i456AED5833D3235E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_0-1701799728651.png" alt="ZachBodenner_0-1701799728651.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I tried adding the new newline formatting that you included in your original post:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var PID = $feature.PID
var HTML = ``
//var newVariable = IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)
HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID+TextFormatting.NewLine+$feature.Address)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
//HTML += `&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"${newVariable}&amp;lt;br&amp;gt;${$feature.ADDRESS}"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`
//HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"

//return HTML

return { 
	type : 'text', 
	text : HTML 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I did wind up with the same issue as you:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_1-1701799806381.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88084i2D274DA577D84F60/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_1-1701799806381.png" alt="ZachBodenner_1-1701799806381.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I tried using the template literal formatting, with backticks, and using the &amp;lt;br&amp;gt; tag to create the carriage return (you don't need to close the break tag, just put it somewhere where you want a new line, along with placing the IIF in a separate variable:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var PID = $feature.PID
var HTML = ``
var newVariable = IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)
//HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+iif(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID+TextFormatting.NewLine+$feature.Address)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"
HTML += `&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"${newVariable}&amp;lt;br&amp;gt;${$feature.ADDRESS}"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`
//HTML += "&amp;lt;p style='text-align: center; line-height: 0.1;'&amp;gt;&amp;lt;span style='font-family: Calibri, sans-serif;'&amp;gt;&amp;lt;em&amp;gt;&amp;lt;span style='font-size: 12px; color: rgb(1, 42, 132);'&amp;gt;"+IIF(isempty(PID),"Pas d'ID Logipro","ID Logipro : "+PID)+"&amp;lt;/span&amp;gt;&amp;lt;/em&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;"

//return HTML

return { 
	type : 'text', 
	text : HTML 
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And that got me where I think you want it to be?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ZachBodenner_2-1701799951975.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88086iE41B248AF262084B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_2-1701799951975.png" alt="ZachBodenner_2-1701799951975.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think if you're using the Arcade element, it makes the most sense to utilize that&lt;/P&gt;&lt;P&gt;return{&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; type: 'text',&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; text:&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;statement, which allows you to utilize the backticks notation and shorten the code a bit. As to&amp;nbsp;&lt;EM&gt;why&lt;/EM&gt;...I'm sure someone else could answer that question better than me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 18:14:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357011#M37868</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2023-12-05T18:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357251#M37880</link>
      <description>&lt;P&gt;I use actually the return things.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The point is this : I have a function to get all of my transaction associated at one building (relationship class between building shape and transaction table).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there is the code :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var transactions = FeatureSetByRelationshipName($feature,"SDE.TRANSACTIONS")
var info = ''
for (var f in transactions){
    info += "ID : " + DefaultValue(f.TRA_ADR_ID, 'no data') + TextFormatting.NewLine +
       "Nom immeuble : " +
        DefaultValue(f.TRA_NOM_IMMEUBLE, 'no data') + TextFormatting.NewLine +
        "Montant : " + 
        DefaultValue(f.TRA_MONTANT, 'no data') + TextFormatting.NewLine +
        "Acquéreur : " +
        DefaultValue(f.TRA_ACQUEREUR, 'no data') + TextFormatting.NewLine + TextFormatting.NewLine
}&lt;/LI-CODE&gt;&lt;P&gt;On one building i can have N transactions associated, so when I click on my pop-up of the building shape, i can see all of the transaction associated, and all of the variables on the transaction are separated by a "TextFormatting.NewLine" to make a line break between variable so the information it show like that :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JasonBOCQUET_0-1701849837045.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88131iD573B53337521E74/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JasonBOCQUET_0-1701849837045.png" alt="JasonBOCQUET_0-1701849837045.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and between each transaction, i would make a line break to have a more airy text.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i think the HTML have to be integrate directly in the function who recover my transaction information (so the part of the code that i share to you in this post) no ? But it is possible to do that ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On your previous exemple, you can't parameter the HTML on the contents of the expression that you write, it's only on the expression himself when it called.&lt;/P&gt;&lt;P&gt;Because I try your thing, and all of my transaction are packed like this :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JasonBOCQUET_1-1701850114755.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88132iBE5BB99C889509C4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JasonBOCQUET_1-1701850114755.png" alt="JasonBOCQUET_1-1701850114755.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;here is the code :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var transactions = FeatureSetByRelationshipName($feature,"SDE.TRANSACTIONS")
var info = ''
for (var f in transactions){
    info += "ID : " + DefaultValue(f.TRA_ADR_ID, 'no data') + TextFormatting.NewLine +
       "Nom immeuble : " +
        DefaultValue(f.TRA_NOM_IMMEUBLE, 'no data') + TextFormatting.NewLine +
        "Montant : " + 
        DefaultValue(f.TRA_MONTANT, 'no data') + TextFormatting.NewLine +
        "Acquéreur : " +
        DefaultValue(f.TRA_ACQUEREUR, 'no data') + TextFormatting.NewLine + TextFormatting.NewLine
}

var newVariable = iif(isempty(info),'Pas de transactions',info);

HTML += `&amp;lt;p style="text-align: left;"&amp;gt;&amp;lt;span style="font-size: 16px; font-family: Calibri, sans-serif;"&amp;gt;&amp;lt;em&amp;gt;&amp;lt;strong&amp;gt;${newVariable}&amp;lt;br&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/p&amp;gt;`

return { 
	type : 'text', 
	text : HTML
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe i miss something in your explanation but i didn't get the point of the utility of the backticks notation to resolve my problem ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 08:10:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357251#M37880</guid>
      <dc:creator>JasonBOCQUET</dc:creator>
      <dc:date>2023-12-06T08:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357360#M37884</link>
      <description>&lt;P&gt;One of the utilities of the backticks is so that you don't actually need to rely on textformatting etc.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/guide/template-literals/#:~:text=Template%20literals%20can%20contain%20placeholders,easier%20text%20manipulation%20in%20Arcade" target="_blank"&gt;https://developers.arcgis.com/arcade/guide/template-literals/#:~:text=Template%20literals%20can%20contain%20placeholders,easier%20text%20manipulation%20in%20Arcade&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/manage-your-strings-quite-literally-with-arcade-1-11/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/manage-your-strings-quite-literally-with-arcade-1-11/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here are some ESRI provided resources that can provide a little more info.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here's one more example of using the backticks to make writing HTML returns a bit easier&lt;/P&gt;&lt;LI-CODE lang="c"&gt;//set variables. First variable is the unique ID that is shared by the primary and related data. Second variable is calling the related forms as a FeatureSet
 
var treeGlobal = $feature.GlobalID;
var relatedForms = FeatureSetByName($map, "Tree Inventory Form")

//create a filter statement where the maintenance form GUID = the Tree Inventory GlobalID

var filterStatement = "TreeInv_Rel = @treeGlobal"

//a maintenance form equals the table run through the filter
 
var inspForm = Filter(relatedForms, filterStatement)

console (inspForm)

if (isEmpty(inspForm)) {
  var title = ``
}

else if (!isEmpty(inspForm)) {
  var title = `&amp;lt;div style="text-align:center"&amp;gt;&amp;lt;b&amp;gt;Inspection Records&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;` 
}
// Sort related features by oldest to newest
var relatedDataSorted = OrderBy(inspForm, 'Date ASC')
 
// Build the pop-up string by iterating through all related features. Add or subtract new lines in the popupString as needed from the related form.
var popupString = ''
for (var f in relatedDataSorted){
    
    popupString += 
        `&amp;lt;div style="text-align:center"&amp;gt;&amp;lt;b&amp;gt;${Text(f.Date, 'MMMM DD, Y')}&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;    
        &amp;lt;b&amp;gt;Maintenance Performed: &amp;lt;/b&amp;gt;${DefaultValue(f.Maintenance_Performed, 'No maintenance performed')}&amp;lt;br&amp;gt;

        &amp;lt;b&amp;gt;Maintenance Performed by: &amp;lt;/b&amp;gt;${DefaultValue(f.Performed_By, 'No maintenance performed')}&amp;lt;br&amp;gt;

        &amp;lt;b&amp;gt;Condition:  &amp;lt;/b&amp;gt;${DefaultValue(f.Condition, 'Condition not assessed')} &amp;lt;br&amp;gt;

        &amp;lt;b&amp;gt;Chemical Used (if any): &amp;lt;/b&amp;gt;${DefaultValue(f.Chemical_Treatment, 'No chemical treatment')} &amp;lt;br&amp;gt;

        &amp;lt;b&amp;gt;Amount Used (if any): &amp;lt;/b&amp;gt;${DefaultValue(f.Chemical_Qty_ML, 'No chemical treatment')} &amp;lt;br&amp;gt;
              
        &amp;lt;b&amp;gt;Notes: &amp;lt;/b&amp;gt;${DefaultValue(f.Notes, 'No notes')}&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;
        `
 
}

return { 
	type : 'text', 
	text : `${title} 
  ${popupString}`
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll notice the backticks enclose my final popupstring variable and I just include an extra &amp;lt;br&amp;gt; tag at the end of the loop. That way, multiple related record come in with some breathing room between each.&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="ZachBodenner_0-1701873552904.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88155i0C979F21B2ECB91D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ZachBodenner_0-1701873552904.png" alt="ZachBodenner_0-1701873552904.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Dec 2023 14:39:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357360#M37884</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2023-12-06T14:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression with HTML, TextFormating.NewLine doesn't work ?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357978#M37902</link>
      <description>&lt;P&gt;Ok i understand !&lt;/P&gt;&lt;P&gt;In practice i suceed to combine my typping method with " and your technic with backtricks and it works for what i want to produce. Thanks you !&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2023 15:10:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcade-expression-with-html-textformating-newline/m-p/1357978#M37902</guid>
      <dc:creator>JasonBOCQUET</dc:creator>
      <dc:date>2023-12-07T15:10:03Z</dc:date>
    </item>
  </channel>
</rss>

