<?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: Typescript error with definitionExpression in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-error-with-definitionexpression/m-p/1007935#M71069</link>
    <description>&lt;P&gt;Thanks John! What a silly mistake...&lt;/P&gt;</description>
    <pubDate>Wed, 09 Dec 2020 00:24:06 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2020-12-09T00:24:06Z</dc:date>
    <item>
      <title>Typescript error with definitionExpression</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-error-with-definitionexpression/m-p/1007920#M71067</link>
      <description>&lt;P&gt;I want to apply a definitionExpression to a feature layer after it's been created in my TypeScript project with this code.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const exp = 'OBJECTID = 1';
regionLayer.definitionExpression(exp);&lt;/LI-CODE&gt;&lt;P&gt;but I am getting the error&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Error TS2349 (TS) This expression is not callable.
Type 'String' has no call signatures&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I add the property when I create the feature layer, I don't get this error&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const test = 'OBJECTID = 1';
const regionLayer = new FeatureLayer({
  url: url,
  definitionExpression: test,
  outFields: ['*']
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;but I have the change the definitionExpression when the user makes certain choices.&lt;/P&gt;&lt;P&gt;What is causing this error?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Dec 2020 23:06:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-error-with-definitionexpression/m-p/1007920#M71067</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2020-12-08T23:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Typescript error with definitionExpression</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-error-with-definitionexpression/m-p/1007932#M71068</link>
      <description>&lt;P&gt;Ken, I believe this is a String &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#definitionExpression" target="_self"&gt;property&lt;/A&gt; and not a method; maybe try this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const exp = 'OBJECTID = 1';
regionLayer.definitionExpression = exp;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 00:09:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-error-with-definitionexpression/m-p/1007932#M71068</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2020-12-09T00:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: Typescript error with definitionExpression</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-error-with-definitionexpression/m-p/1007935#M71069</link>
      <description>&lt;P&gt;Thanks John! What a silly mistake...&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 00:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/typescript-error-with-definitionexpression/m-p/1007935#M71069</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2020-12-09T00:24:06Z</dc:date>
    </item>
  </channel>
</rss>

