Simeon, You can definitely do this you would begin by putting the code in the queryFeaturesText function. I will not likely add this as it is pretty specific to your needs and you would not want to have a like query inserted all the time when MANY times most people are looking for an exact match query. Anyway you need to insert your addition in this block: if ((queryLayer) && (txtSearch.text || cbSearch.text))
{
var query:Query = new Query();
var myPattern:RegExp = /\[value\]/g;
var expr:String;
var eVal:String;
if (txtSearch.visible){
if(queryExpr != "[value]")//meaning an open SQL expression
eVal = txtSearch.text.replace("'","''");
else
eVal = txtSearch.text;
expr = queryExpr.replace(myPattern, eVal);
}else{
eVal = cbSearch.selectedItem.value.replace("'","''");
expr = queryExpr.replace(myPattern, eVal);
}
query.where = expr;You would want to check if the queryExpr is the one that you are looking to replace (meaning check that it equals the one that you setup for your specific layer), you could go as far as assigning some bogus expression in the XML that you could check for. Notice in the code above I check for an open SQL expression you would want to do something like this: if(queryExpr == "your value"){
expr = mySQLBuilderFunction(txtSearch.text);
}else if(queryExpr != "[value]"){//meaning an open SQL expression
eVal = txtSearch.text.replace("'","''");
expr = queryExpr.replace(myPattern, eVal);
}else{
eVal = txtSearch.text;
expr = queryExpr.replace(myPattern, eVal);
}Then you build your private function to do the SQL Statement building.Don't forget to click the Mark as answer check and to click the top arrow (promote) as shown below: