Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

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
Tera Guru
Tera Guru

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,

Mohamed Azarudeen Z

Developer @ KPMG