How to create a GlideRecord Query for NOT STARTSWITH

Rajanmehta
Mega Guru

Hello

We are on Jakarta. I have a need to filter out IP address which starts with 172.

How can I add to my query? Any help on syntax would greatly appreciated.

rec.addQuery('ip_address', 'STARTSWITH','172.');   ( I want to add query like this but with negation i.e. Does not Starts with)

Thanks,

Rajan Mehta

1 ACCEPTED SOLUTION

Hi dan.bruhn,



Please help to convert this post from discussion to question. Thank you for your help.


View solution in original post

15 REPLIES 15

Shishir Srivast
Mega Sage

can we try with NOT LIKE


hi Shishir,



I tried that, but unfortunately it doesn't filter correctly.



Thanks for your response though.



Thanks,


what is your exact requirement, can you please explain?


Exact requirement is to filter out hosts which IPs starts with 172. (Want to exclude that subnet)