JSDO properties, methods, and events reference : caseSensitive property
  

caseSensitive property

A boolean on a JSDO and its table references that indicates if string field comparisons performed by supported JSDO operations are case sensitive or case-insensitive for the affected table references in JSDO memory.
When set to true, all supported comparisons on string fields for an affected table reference are case sensitive. When set to false, all supported comparisons on string fields for an affected table reference are case insensitive. The default setting is false for all table references of a JSDO.
Note: This default setting (case insensitive) matches the default setting for letter case comparison in OpenEdge Data Objects (ABL).
Data type: boolean
Access: Readable/Writable
Applies to: progress.data.JSDO class, table reference property (JSDO class)
When set on a JSDO, the property setting affects all table references in the JSDO. When set on a single table reference, the property setting affects only the specified table reference. For example, to set this property to true on only a single table reference in the JSDO:
1. Set the value on the JSDO to false, which sets false on all its table references.
2. Set the value on the selected table reference to true, which sets true on only the one table reference.
The JSDO operations that follow this property setting in string field comparisons include:
*Sorting record objects in JSDO memory, including automatic sorting using sort fields that you specify using the autoSort property and the setSortFields( ) method, and manual sorting using specified sort fields that you perform using the sort( ) method
Note: Changing the value of this property triggers an automatic sort if the autoSort property is also set to true for the affected table reference.
*Merging record objects into JSDO memory for all merge modes that perform record field comparisons during execution of the addRecords( ) method
Note: Any default string field comparisons that you might do in JavaScript within the callback functions that you specify for other JSDO methods and events are always case sensitive according to JavaScript rules and ignore this property setting.
Note: To conform to Unicode default letter case mapping, the JSDO support for case-insensitive string-field comparison and sorting relies on the toUpperCase( ) JavaScript function instead of the toLocaleUpperCase( ) JavaScript function. The latter function uses the locale letter case mapping, which might be different from the default letter case mapping in Unicode.
Note: Unlike character string comparisons in OpenEdge ABL, all JSDO-supported string field comparisons include trailing spaces and ignore any OpenEdge-specified collation tables.

Example

In the following code fragment, automatic local sorting is set up for the eCustomer table reference on a JSDO created for an OpenEdge resource (dsCustOrds), with its Name field as the single descending sort field. All other table references on dsCustOrds have no automatic local sorting set up by default. Because OpenEdge sorting on string fields is case-insensitive by default, the fragment makes the local sort on the Name field case sensitive by setting caseSensitive on eCustomer to true:
dsCustOrds = new progress.data.JSDO( { name: 'dsCustomerOrders' } );

dsCustOrds.autoSort = false;
dsCustOrds.eCustomer.autoSort = true;
dsCustOrds.eCustomer.setSortFields( "Name:descending" );
dsCustOrds.eCustomer.caseSensitive = true;

dsCustOrds.fill();
. . .
When the fill( ) method executes on the JSDO, after all the referenced tables are loaded from the server, with their record objects already sorted in case-insensitive, primary key order (by default), the record objects for eCustomer are then sorted locally in case-sensitive, descending order by the Name field.

See also:

addRecords( ) method, autoSort property, setSortFields( ) method, sort( ) method