Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

List of CIs that do not start with Generic

George56
Tera Contributor

Hello,

 

I have a requirement to exclude CIs where the name starts with "Generic" on a field that references the cmdb.  Has anyone successfully used "NOT STARTSWITH" in an encoded query?  If there is another alternative, I'd appreciate any ideas.  Thanks

1 REPLY 1

Its_Azar
Mega Sage

Hi there @George56 

You can’t use NOT STARTSWITH in an encoded query, so it won’t work as-is. Instead, filter using:

nameNOT LIKEGeneric%

 

This will exclude any CI whose name begins with "Generic". You can add other conditions after it if needed. Simple and works fine for reference qualifiers and GlideRecord filters.

 

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.