<?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: Create a multi-line label from a single field (ArcGIS API for JS) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128855#M75689</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp; &amp;nbsp;thanks for the idea. I didn't manage to get the string.replace syntax to work, in part because the arcade Replace did work. But I appreciate the suggestion.&lt;/P&gt;&lt;P&gt;~stefan&lt;/P&gt;</description>
    <pubDate>Sun, 26 Dec 2021 08:10:15 GMT</pubDate>
    <dc:creator>WWUMap</dc:creator>
    <dc:date>2021-12-26T08:10:15Z</dc:date>
    <item>
      <title>Create a multi-line label from a single field (ArcGIS API for JS)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128828#M75685</link>
      <description>&lt;P&gt;Hey All,&lt;/P&gt;&lt;P&gt;For my labels, I'd&amp;nbsp; like to stack every single word in my label field into a new line.&lt;/P&gt;&lt;P&gt;Thus:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Student Recreation Center&lt;/P&gt;&lt;P&gt;Would become:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Student&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Recreation&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Center&lt;/P&gt;&lt;P&gt;Essentially, I just need to replace ever space ( ' ' ) with textFormatting.NewLine.&lt;/P&gt;&lt;P&gt;I could just calc a new field, with a lot of textFormatting, but it seems like there should be an easy way to do this within the code.&lt;/P&gt;&lt;P&gt;thanks,&lt;/P&gt;&lt;P&gt;~stefan&lt;/P&gt;</description>
      <pubDate>Sat, 25 Dec 2021 00:21:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128828#M75685</guid>
      <dc:creator>WWUMap</dc:creator>
      <dc:date>2021-12-25T00:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Create a multi-line label from a single field (ArcGIS API for JS)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128838#M75686</link>
      <description>&lt;P&gt;Just &lt;STRONG&gt;string.replace(' ', textFormatting.NewLine)&lt;/STRONG&gt;, I would imagine.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.w3schools.com/jsref/jsref_replace.asp" target="_blank"&gt;https://www.w3schools.com/jsref/jsref_replace.asp&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Dec 2021 15:15:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128838#M75686</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-12-25T15:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create a multi-line label from a single field (ArcGIS API for JS)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128853#M75687</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/542489"&gt;@WWUMap&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Use arcade expression replace function:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Replace($feature["attributeFieldName"], ' ', textFormatting.NewLine);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Sun, 26 Dec 2021 06:21:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128853#M75687</guid>
      <dc:creator>Kishore</dc:creator>
      <dc:date>2021-12-26T06:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: Create a multi-line label from a single field (ArcGIS API for JS)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128854#M75688</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/419647"&gt;@Kishore&lt;/a&gt;&amp;nbsp;- Thanks!&lt;/P&gt;&lt;P&gt;The arcade Replace works great.&lt;/P&gt;&lt;P&gt;Here's the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;const nameLabelClass = {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; labelExpressionInfo: {expression: "Replace($feature.Name, ' ', textFormatting.NewLine )"},&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;~stefan&lt;/P&gt;</description>
      <pubDate>Sun, 26 Dec 2021 08:10:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128854#M75688</guid>
      <dc:creator>WWUMap</dc:creator>
      <dc:date>2021-12-26T08:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create a multi-line label from a single field (ArcGIS API for JS)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128855#M75689</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp; &amp;nbsp;thanks for the idea. I didn't manage to get the string.replace syntax to work, in part because the arcade Replace did work. But I appreciate the suggestion.&lt;/P&gt;&lt;P&gt;~stefan&lt;/P&gt;</description>
      <pubDate>Sun, 26 Dec 2021 08:10:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/create-a-multi-line-label-from-a-single-field/m-p/1128855#M75689</guid>
      <dc:creator>WWUMap</dc:creator>
      <dc:date>2021-12-26T08:10:15Z</dc:date>
    </item>
  </channel>
</rss>

