Define search criteria for a given field. This determines if the row should be included in the result set or not based on whether the field contents match the specified pattern.


First available in version 3.0 build 2039.

Input Parameters:

fieldName - Name of the field you are defining the search criteria for.

pattern - Pattern that you want to find. The pattern may include wildcard characters (*) that match 0 or more characters.

matchType - [Optional] - Type of match desired. If you use exact, wildcard characters are treated as literals and the pattern must match the field value exactly. A partial match allows wildcards but works like an exact search if the pattern doesn't include wildcards. Valid values include: Exact,Partial. Default value is Partial.

exclusive - [Optional] - Set this to 'true' if the field must match the pattern. If you set this value to FALSE, the row will be included if the pattern matches the field contents but it won't be excluded if it doesn't match. Valid values include: true,false. Default value is false.

Output Parameters:

No output parameters.

Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Catalog.addPattern( paramsObject [, callbackParamsObject] [, errorParamsObject] );

Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Catalog.addPattern( paramsObject );


Case is always ignored, so searching for "DOG" will give the same results as searching for "dog" even when you specify a matchType of "EXACT".

Catalog.addPattern should be called as many times as necessary to define criteria for multiple fields. If you call it more than once for the same field, only the last setting will be used in the search.



ssCore.Catalog.addPattern({fieldName:"FirstName", pattern:"Rob*" matchType:"Partial", exclusive:true});