<?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: LabelExpressionInfo with single quotes does not show labels in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelexpressioninfo-with-single-quotes-does-not/m-p/1312173#M81789</link>
    <description>&lt;P&gt;If working with a literal, you must "double escape" the apostrophe:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const name = "Bob\\'s";
//etc
labelExpressionInfo: {expression: `"${name}"`}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise, you'll need to do the escaping in the expression itself:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const name = "Bob's";
//etc
labelExpressionInfo: {expression: `Replace("${name}", "'", "\'")`}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2023 17:45:03 GMT</pubDate>
    <dc:creator>JoelBennett</dc:creator>
    <dc:date>2023-07-26T17:45:03Z</dc:date>
    <item>
      <title>LabelExpressionInfo with single quotes does not show labels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelexpressioninfo-with-single-quotes-does-not/m-p/1312077#M81783</link>
      <description>&lt;P&gt;I want to assign a labelexpressioninfo to a labelclass for a featurelayer that may contains single apostrophes. However, these labels appear to interfere with the arcade expression construction. How can I get the label to appear? Escaping the character does not help either.&lt;/P&gt;&lt;P&gt;codepen demonstration issue with label "Bob's":&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/coxfsi/pen/KKrGNbj?editors=1000" target="_blank"&gt;https://codepen.io/coxfsi/pen/KKrGNbj?editors=1000&lt;/A&gt;&lt;/P&gt;&lt;P&gt;example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        const name = "Bob's";
        const labelClass = {
          // autocasts as new LabelClass()
          symbol: {
            type: "text", // autocasts as new TextSymbol()
            color: "green",
            backgroundColor: [213, 184, 255, 0.75],
            borderLineColor: "green",
            borderLineSize: 1,
            yoffset: 5,
            font: {
              // autocast as new Font()
              family: "Playfair Display",
              size: 12,
              weight: "bold"
            }
          },
          labelPlacement: "above-center",
          labelExpressionInfo: {
            expression: `'${name}'`
          }
        };&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 15:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelexpressioninfo-with-single-quotes-does-not/m-p/1312077#M81783</guid>
      <dc:creator>platmoskito</dc:creator>
      <dc:date>2023-07-26T15:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: LabelExpressionInfo with single quotes does not show labels</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelexpressioninfo-with-single-quotes-does-not/m-p/1312173#M81789</link>
      <description>&lt;P&gt;If working with a literal, you must "double escape" the apostrophe:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const name = "Bob\\'s";
//etc
labelExpressionInfo: {expression: `"${name}"`}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Otherwise, you'll need to do the escaping in the expression itself:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const name = "Bob's";
//etc
labelExpressionInfo: {expression: `Replace("${name}", "'", "\'")`}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2023 17:45:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelexpressioninfo-with-single-quotes-does-not/m-p/1312173#M81789</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-07-26T17:45:03Z</dc:date>
    </item>
  </channel>
</rss>

