<?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: Different Definition Expression Case Sensitivity Depending on Data Source in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657941#M87724</link>
    <description>&lt;P&gt;Thanks both.&amp;nbsp; I was secretly wishing for a simple property to set when applying the query rather than coping with restructuring a potentially long and variable query string, but never mind.&amp;nbsp; Your explanations and suggestions are very helpful, thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Oct 2025 08:23:29 GMT</pubDate>
    <dc:creator>MarkSmith</dc:creator>
    <dc:date>2025-10-15T08:23:29Z</dc:date>
    <item>
      <title>Different Definition Expression Case Sensitivity Depending on Data Source</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657422#M87715</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a map service published in ArcGIS Server 11.5 with several spatial layers in it.&amp;nbsp; Some of the layers are stored on a SQL Server database and some are stored in a File Geodatabase.&lt;/P&gt;&lt;P&gt;I'm using the JavaScript API to set&amp;nbsp;definitionExpression on the layers and I've noticed that the layers in the map service who's data source is SQL Server will let me apply&amp;nbsp;definition expressions that are not case sensitive, whereas the layers with a data source of a&amp;nbsp;File Geodatabase ARE case sensitive.&lt;/P&gt;&lt;P&gt;This inconsistency is a bit of a pain because users can input the text they wish to search for, and asking the user to know in advance about the case of the text is problematic - they shouldn't have to know, and perhaps can't rely on the attribute values being stored in a consistent manner anyway.&amp;nbsp; For example, they may wish to search for the word "farm", but the text field being searched might be storing "Farm" as well as "farm" and so not all the features will be returned in the results, but only for the File Geodatabase layers.&amp;nbsp; So in this example the query being applied via mySubLayer.definitionExpression will be DESCRIPTION like '%farm%'.&lt;/P&gt;&lt;P&gt;I was wondering if anyone else has had this problem and how to solve it so that no matter what the data source, setting a&amp;nbsp;definitionExpression is NOT case sensitive?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Oct 2025 14:36:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657422#M87715</guid>
      <dc:creator>MarkSmith</dc:creator>
      <dc:date>2025-10-13T14:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Different Definition Expression Case Sensitivity Depending on Data Source</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657541#M87717</link>
      <description>&lt;P&gt;ArcGIS software does not set or determine the collation of data sources.&amp;nbsp; The default collation of most data sources is case sensitive, which you are seeing with the file geodatabase.&amp;nbsp; For RDBMS, SQL Server and MySQL are commonly case insensitive while Oracle, PostgreSQL, and DB2 are commonly case sensitive.&lt;/P&gt;&lt;P&gt;Unless you are able to enforce specific collations of data sources, or force how users input data through validation rules or similar, it is best to assume all queries will be case sensitive and adjust your queries accordingly.&lt;/P&gt;&lt;P&gt;I am not a JavaScript developer, so I can't say for sure, but I believe SQL UPPER and LOWER functions will work within a definitionExpression.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 14:38:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657541#M87717</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2025-10-14T14:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Different Definition Expression Case Sensitivity Depending on Data Source</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657875#M87723</link>
      <description>&lt;P&gt;Yes, extending what&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1371"&gt;@JoshuaBixby&lt;/a&gt;&amp;nbsp;has already said, if you had the user-specified value stored in a variable called "userValue", then you'd have something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;layer.definitionExpression = "LOWER(DESCRIPTION) LIKE '%" + userValue.toLowerCase() + "%'";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You might also need to add some additional logic to accommodate for the user value containing an apostrophe (i..e. single quotation) mark as well.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 23:03:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657875#M87723</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-10-14T23:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: Different Definition Expression Case Sensitivity Depending on Data Source</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657941#M87724</link>
      <description>&lt;P&gt;Thanks both.&amp;nbsp; I was secretly wishing for a simple property to set when applying the query rather than coping with restructuring a potentially long and variable query string, but never mind.&amp;nbsp; Your explanations and suggestions are very helpful, thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 08:23:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1657941#M87724</guid>
      <dc:creator>MarkSmith</dc:creator>
      <dc:date>2025-10-15T08:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Different Definition Expression Case Sensitivity Depending on Data Source</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1658122#M87725</link>
      <description>&lt;P&gt;Glad to help out where possible.&lt;/P&gt;&lt;P&gt;Note that it is possible to mark more than one post as a solution.&amp;nbsp; It's up to you, but Joshua's post might qualify as well since he brought up the SQL methodology, which is the best way to handle case-sensitivity issues.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 16:51:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/different-definition-expression-case-sensitivity/m-p/1658122#M87725</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2025-10-15T16:51:53Z</dc:date>
    </item>
  </channel>
</rss>

