Select to view content in your preferred language

Version 4.24 -> 4.25 or 4.26 - Default generated feature service query WHERE clause is no longer the same

625
3
Jump to solution
03-06-2023 06:21 PM
YimYean
New Contributor II

Hello,

I've been testing our version 4.11 until 4.26 to try to see where things changed and it looks like in 4.25+ the generated feature service query has changed.

Before:

YimYean_0-1678155636888.png

After: The UPPER has changed to LOWER and the LIKE clause no longer includes the % at the beginning.  Is this expected change or bug?  If a bug how would I go about overriding it to perform custom query?

YimYean_1-1678155647741.png

Best,

Yim

 

 

0 Kudos
1 Solution

Accepted Solutions
JoelBennett
MVP Regular Contributor

It seems likely you're seeing this in relation to the Search widget.  If that's the case, please see this thread.

View solution in original post

3 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

Do you have a reproducible case for this? I am not able to reproduce what you are describing here. I tested it and the following code

document.getElementById("queryButton").addEventListener("click", ()=> {
  const where = "UPPER(STATE_NAME) LIKE 'Miss%'"
  featureLayer.queryFeatures({where: where}).then((results)=>{
    console.log(results)
  });
});

 

results in this query. 

Screenshot 2023-03-07 at 12.06.43 PM.png

0 Kudos
YimYean
New Contributor II

Thanks @UndralBatsukh for the reply, it seems like my issue is related to the issue that @JoelBennett commented and has more details into the issue.

0 Kudos
JoelBennett
MVP Regular Contributor

It seems likely you're seeing this in relation to the Search widget.  If that's the case, please see this thread.