How to make assignment rule case insensitive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2018 12:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2018 12:43 PM
Thanks Michael. Is the script the only way? Is it possible to configure using the gui?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2018 01:52 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2018 12:56 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-27-2018 12:23 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2018 07:43 AM
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.