I have the same issue with the 3.15 javascript API and ArcGIS Server 10.3.
Can't find a workaround, which is pretty frustrating.
Please provide the where clause you are creating that doesn't work, exactly copy/pasted. This would help people understand your problem better.
Here is my code:
/********************************************************************************************/
var queryPCTask = new QueryTask(this.layers[0].queryParameters.url);
var queryPC = new Query();
queryPC.where = "UPPER(MUNICIPALITE) LIKE '%MONTRÉAL%'";
queryPC.outFields = ["*"];
var statisticDefinition = new esri.tasks.StatisticDefinition();
statisticDefinition.statisticType = "count";
statisticDefinition.onStatisticField = "TYPE_SITE_DESC";
statisticDefinition.outStatisticFieldName = "TYPE_SITE_DESC_COUNT";
queryPC.outStatistics = [statisticDefinition];
queryPC.groupByFieldsForStatistics = ["TYPE_SITE_DESC"];
queryPCTask.execute(queryPC, lang.hitch(this, 'updatePCDashboard'), lang.hitch(this, 'updatePCDashboardError'));
/********************************************************************************************/
When Executed, I get this error: Error: Unable to complete operation. at Error (native) at Object.h.load
If I modify my query to:
queryPC.where = "MUNICIPALITE LIKE '%MONTRÉAL%'"
The query task is successful.
As stated initially in this post, the problem seems to be related to the statisticDefinition because without that, I can use Upper/Lower without any problems
/********************************************************************************************/
var queryPC = new Query();
queryPC.where = "UPPER(MUNICIPALITE) LIKE '%MONTRÉAL%'";
queryPC.outFields = ["*"];
queryPCTask.execute(queryPC, lang.hitch(this, 'updatePCDashboard'), lang.hitch(this, 'updatePCDashboardError'));
/********************************************************************************************/
Regards,