In the SalesLogix web client, the Lookup Control is a custom composite control that is contained in a compiled Sage assembly. When you perform a lookup with this control, the operators available are based upon the type of field being looked up for. For string fields, the default operator is “Contains”

The reason the “Contains” operator is the default is because it is the first option on the drop down list. Luckily the drop down list is not constructed from within the Sage Controls assembly. Rather a client library is used to add the operators using Ext-JS.
The code for this client library is in the VFS under Portal Manager…Sage SalesLogix…Support Files…JScript…Sage-Controls. There are two files involved:
- Sage-Controls-Lookup.JS
- Sage-Controls.JS
The Sage-Controls is a composite of all of the other script files and is minified. This is the file that is actually used by the deployed web site.
If we look in the human-readable Sage-Controls-Lookup.js file we can see code around line 80 that looks like:
LookupControl.__operators = {
"System.String": [
{name: "LookupControl_Operator_Contains", value: "ct"},
{name: "LookupControl_Operator_StartsWith", value: "sw"},
{name: "LookupControl_Operator_Equal", value: "eq"},
{name: "LookupControl_Operator_NotEqual", value: "ne"},
{name: "LookupControl_Operator_GT", value: "gt"},
{name: "LookupControl_Operator_GE", value: "ge"},
{name: "LookupControl_Operator_LT", value: "lt"},
{name: "LookupControl_Operator_LE", value: "le"}
],
This code is what is constructing the list of Operators available in the Lookup for a string field lookup.
If we wanted to change the lookup behavior so that Starts With is the default option, we simply need to make that operator the first one added to the list.
Now to make this change actually take effect, you need to modify the minified sage-controls.js file. The easiest way to do this is to search for “LookupControl_Operator_StartsWith”. It should be around line 719. Since it is minified there are no line breaks or spacing but if you make the equivalent change on this line, when you save these files and deploy, your lookup should then default to the operator at the top of your list.LookupControl.__operators = {
"System.String": [
{name: "LookupControl_Operator_StartsWith", value: "sw"},
{name: "LookupControl_Operator_Contains", value: "ct"},
{name: "LookupControl_Operator_Equal", value: "eq"},
{name: "LookupControl_Operator_NotEqual", value: "ne"},
{name: "LookupControl_Operator_GT", value: "gt"},
{name: "LookupControl_Operator_GE", value: "ge"},
{name: "LookupControl_Operator_LT", value: "lt"},
{name: "LookupControl_Operator_LE", value: "le"}
],