stevel

QUERYTASK and case sensitivity

Discussion created by stevel on Jul 28, 2011
Latest reply on Sep 10, 2013 by stevel
What are the techniques recommended for handling case sensitivity in a query in the JS API?

The Query No Map sample is a perfect example - search on "CALIFORNIA" and it returns no results.

Is there a way to handle the situation where the user doesn't know the correct capitalisation required?

function execute(stateName) {
        query.text = stateName;
        queryTask.execute(query,showResults);
      }


You could convert query.text to upper- or lower-case, but that doesn't help unless the actual value in the geodatabase matches. Is there a flag to ignore the case in a query?

Thanks,
Steve

Outcomes