Exclude items that start with a string from a reference type catalog item variable

b__LeonardoC
Tera Contributor

Is there an OOTB way to exclude items that start with a certain string from a reference variable? I've been trying with the regEx conditional but i saw in previous discussions that it doesn't work.

4 REPLIES 4

Niklas Peterson
Mega Sage
Mega Sage

Hi,

That is what Reference Qualifiers are used for.

 

https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/script/server-scripting...

 

Regards,
Niklas

Hi Niklas,

I meant to say that im using the reference Qualifier option of RegEx, but it isnt working and service now isn't giving it any more support. Is there a way to populate a reference field so it excludes all items which names start with CMD with a reference qualifier, or am i going to have to populate via script?

Oh, sorry. I missed the exclude part that makes this a totally different matter. Seems the negativ lookahead is not working. I guess you will need to go through a script include.

 

Sorry for missleading.

 

Regards,
Niklas

b__LeonardoC
Tera Contributor

Hi Niklas.

I meant to say that i was using the Regular Expression condition in the reference qualifier of the variable i am filtering, but it isn't working and as far as i know service now isn't giving this option any more support. So is there another option that can replace this? Can i exclude all items that start with CMD through a reference qualifier or am i going to have to do it via Scripting?