How to make assignment rule case insensitive

wbwb
Tera Expert

How can I make these word matches case insensitive?  Here's what I have loaded up so far(see pic) but too many variations in upper and lower case are coming in which make the assignment rule ineffective. Can I use some sort of LIKE statement in there?

find_real_file.png

9 REPLIES 9

wbwb
Tera Expert

Thanks Michael.  Is the script the only way?  Is it possible to configure using the gui?

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

ServiceNow runs on a linux based server and that by default is case sensitive.  There aren't any functions in the condition builder to make it case insensitive unfortunately that I am aware of.

AshishKM
Kilo Patron
Kilo Patron

Aggregated function like 'toLowerCase' or 'toUpperCase' can be applied only via scripts.


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Chris Bui
Giga Expert

I've solved this by using "matches regex" option in the filter instead of contains.  They don't let you write a fully qualified regex so you have to get creative.

For example, you want the assignment rule to fire when the short_description contains dba, database, or database.

If I were writing a script for this requirement, it would look like this:

var regexPattern = /dba|data\s?base/gi;

But they only let you enter the pattern part and not the flags in the filter condition.

So instead we can do:

.*[dD][bB][aA].*
.*[dD][aA][tT][aA]\s?[bB][aA][sS][eE].*

You could do it all in 1 line but it's not as readable.  Here's how it looks in the platform.

find_real_file.png

wbwb
Tera Expert

Cool.  I'll have to try this out when I have a second.  This should really be added as a new feature for these types of filters.