- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2017 06:07 AM
So I have a requirement to filter SN on the 5th and 6th positions of a server name. This is in Helsinki and on a reference field within a Record Producer. I can't seem to get either matches pattern or matches regex to work. I get a lot of SQL/MySql errors. What's the trick? I'll keep googling. Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2018 11:53 AM
The biggest WTF is that a feature - known broken and recommended not to be used - still hasn't been pulled.
If it doesn't work and serves no purpose... why leave it in?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2017 12:04 PM
Hey Steve - your issue is that gp is a list of names, NOT sys_ids
gp += grp.name;
..
return 'sys_id_IN' + gp;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2017 12:05 PM
also your return statement is bad in that you have an extra "_" between sys_id and IN.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2017 12:44 PM
hey ctomasi -- I submitted this issue as a question on the MariaDB site and got an interesting reponse:
I don't know anything about ServiceNow, but neither MATCH_PAT nor MATCH_RGX are valid MariaDB syntax. See Regular Expressions Functions for the list of available functions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2017 05:28 AM
I wish I had more information on these. I've run in to this myself, but didn't get much back from our developers on what the syntax is, when to use each, and what they are for. Apologies.
It might be more impactful if you create an enhancement request to get the docs updated accordingly. It means more from customers.
Enhancement requests: Tell us how you would improve the ServiceNow product
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2017 12:12 PM
I copied this code from another community entry. took me a while to determine my problem was the extra "_" in the code as you mention. Ugh! It works now.