<?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: LabelClass where clause not working in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1023158#M71618</link>
    <description>&lt;P&gt;If using "$feature.MARKER_ACTIVITY" works with your clause but '"\u2714"' doesn't, you should open a bug report.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Feb 2021 19:42:49 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-02-03T19:42:49Z</dc:date>
    <item>
      <title>LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022347#M71582</link>
      <description>&lt;P&gt;This works:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;where: "status = PENDING"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to apply a condition to my LabelClass as follows... the &lt;STRONG&gt;where&lt;/STRONG&gt; clause does not seem to be working&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      labelClass = {
        symbol: {
          type: 'text',  // autocasts as new TextSymbol()
          color: 'black',
          font: {  // autocast as new Font()
            family: 'Material Icons',
          }
        },
        labelPlacement: 'center-center',
        labelExpressionInfo: {
          expression: '"\u2714"'
        },
        where: "status in ('PENDING', 'DRY_RUN')"
      }; &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 22:34:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022347#M71582</guid>
      <dc:creator>JimBambrough</dc:creator>
      <dc:date>2021-02-01T22:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022420#M71583</link>
      <description>&lt;P&gt;What happens if you go long form?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;status = 'PENDING' OR status = 'DRY_RUN'&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 02 Feb 2021 02:01:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022420#M71583</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-02-02T02:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022424#M71584</link>
      <description>&lt;P&gt;Yes, I tried that also. In fact, I've tried most every variation I could think of:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;where: "status = PENDING or status = DRY_RUN"
where: "status = PENDING OR status = DRY_RUN"
where: "status = PENDING || status = DRY_RUN"
where: "status in ('PENDING', 'DRY_RUN')"
where: "status IN ('PENDING', 'DRY_RUN')"
where: "status IN (PENDING, DRY_RUN)"
where: "status = 'PENDING' or status = 'DRY_RUN'"
where: "status = PENDING |DRY_RUN"
where: "status in PENDING |DRY_RUN"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 02:18:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022424#M71584</guid>
      <dc:creator>JimBambrough</dc:creator>
      <dc:date>2021-02-02T02:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022569#M71592</link>
      <description>&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;"status == 'PENDING' || status == 'DRY_RUN'"&lt;/P&gt;&lt;P&gt;"(status = 'PENDING') || (status = 'DRY_RUN')"&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 15:27:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022569#M71592</guid>
      <dc:creator>MatthewDriscoll</dc:creator>
      <dc:date>2021-02-02T15:27:22Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022595#M71593</link>
      <description>&lt;P&gt;There are some strange things going on with the "where" expression. Looking at &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/labels-basic/" target="_self"&gt;this sample&lt;/A&gt; (and adding in your labelExpressionInfo), I've tried a few different versions. It looks like it doesn't like spaces in the clause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;where: "MARKER_ACTIVITY IN ('Picnicking','Sledding/Tubing')" - returns check marks
where: "MARKER_ACTIVITY IN ('Picnicking', 'Sledding/Tubing')" - doesn't return check marks
where: "(MARKER_ACTIVITY = 'Sledding/Tubing') or (MARKER_ACTIVITY = 'Picnicking')" - doesn't return check marks
where: "(MARKER_ACTIVITY = 'Sledding/Tubing')||(MARKER_ACTIVITY = 'Picnicking')" - doesn't return check marks
where: "(MARKER_ACTIVITY = 'Sledding/Tubing') || (MARKER_ACTIVITY = 'Picnicking')" - doesn't return check marks
where: "MARKER_ACTIVITY = 'Sledding/Tubing'" - returns check marks
where: "MARKER_ACTIVITY = 'Intermediate Parent Group'" - doesn't return check marks
where: "MARKER_ACTIVITY like 'Intermediate%'" - returns check marks&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 16:25:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022595#M71593</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-02-02T16:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022651#M71595</link>
      <description>&lt;P&gt;Hi Ken - I got this to work ok in CodePen:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;          labelExpressionInfo: {
            expression: "$feature.MARKER_ACTIVITY"
          },
          where: "MARKER_ACTIVITY IN ('Campground Camping', 'Sledding/Tubing')"
        };&lt;/LI-CODE&gt;&lt;P&gt;regardless of a space (or not) following the comma',' after Campground Camping.&lt;/P&gt;&lt;P&gt;Basically mimics this from the api:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-LabelClass.html&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;labelClass.where = "MARKER_ACTIVITY IN ('Picnicking', 'Group Camping')";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 17:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022651#M71595</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2021-02-02T17:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022676#M71596</link>
      <description>&lt;P&gt;Yes, it does work using this expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;labelExpressionInfo: {
  //expression: '"\u2714"'
  expression: "$feature.MARKER_ACTIVITY"
},
where: "MARKER_ACTIVITY IN ('Campground Camping', 'Sledding/Tubing')"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it doesn't work when using '"\u2714"'&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 18:50:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022676#M71596</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-02-02T18:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022681#M71597</link>
      <description>&lt;P&gt;Correct, that part is on Jim here.&amp;nbsp; I'm not sure where his layer is coming from....&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 18:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022681#M71597</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2021-02-02T18:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022852#M71606</link>
      <description>&lt;P&gt;Since I did get one simple use case working, I just created 2 LabelClasses and applied them. So in tandem they achieved what I was going for. I ran out of time trying to figure out the where clause. Here is my solution:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;      labelBase = {
        symbol: {
          type: 'text',  // autocasts as new TextSymbol()
          color: 'black',
          font: {  // autocast as new Font()
            family: 'Material Icons',
            size: size
          }
        },
        labelPlacement: 'center-center',
        labelExpressionInfo: {
          expression: '"\u2714"'
        }
      };

      labelClassDryRun = Object.assign({}, labelBase);
      labelClassDryRun.where = "status = DRY_RUN";

      labelClassServiced = Object.assign({}, labelBase);
      labelClassServiced.where = "status = SERVICED";     
      ......
      labelingInfo: [labelClassServiced, labelClassDryRun, labelInfo] &lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Feb 2021 00:49:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022852#M71606</guid>
      <dc:creator>JimBambrough</dc:creator>
      <dc:date>2021-02-03T00:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022940#M71610</link>
      <description>&lt;P&gt;Did you check whether this (removing the space after the comma) worked?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;where: "status in ('PENDING','DRY_RUN')"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:47:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1022940#M71610</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-02-03T12:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1023037#M71617</link>
      <description>&lt;P&gt;Yes, I did try this with no luck&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 16:31:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1023037#M71617</guid>
      <dc:creator>JimBambrough</dc:creator>
      <dc:date>2021-02-03T16:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: LabelClass where clause not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1023158#M71618</link>
      <description>&lt;P&gt;If using "$feature.MARKER_ACTIVITY" works with your clause but '"\u2714"' doesn't, you should open a bug report.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 19:42:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/labelclass-where-clause-not-working/m-p/1023158#M71618</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-02-03T19:42:49Z</dc:date>
    </item>
  </channel>
</rss>

