How to ignore case in server name in relevance

I am trying to create an automatic group but using relevance. This is for my nonWindows servers (Linux and Solaris). I have some server names that are in all lowercase, some that are all uppercase and some that are a combination of the two. Is there a way to ignore the case of the servername to add it properly to the automatic group? Right now i have this expression at the end of my relevance- as lowercase contains ("," & computer name as uppercase & “,”)

Yes. Essentially, you want to convert both the actual value, and the compared value to the same case (either upper or lower). So, using the short sample you have above, we would want something like:

as lowercase contains ("," & computer name as lowercase & ",")

2 Likes

Awesome thanks i will give your suggestion a try

I know this is an older post, but could you elaborate on this a bit more? This is exactly what I am trying to resolve for the relevance below. I can add upper or lower case and it works, but will not find both cases.

(version of client >= “6.0.0.0”) AND (exists true whose (if true then ((if true then (exists (operating system) whose (it as string as lowercase contains “Win2012” as lowercase)) else false) AND (it starts with “XXX” or it starts with “XXX”) of (computer name as lowercase)) else false))

Due to case sensitivity, when comparing strings, we’ll want to cast both sets of strings to the same case. Here is an example to try to illustrate:

Q: "MyComputer" = "MYCOMPUTER"
A: False

Q: "MyComputer" as lowercase
A: mycomputer

Q: "MYCOMPUTER" as lowercase
A: mycomputer

Q: "mycomputer"="mycomputer"
A: True

Q: "MyComputer" as lowercase = "MYCOMPUTER" as lowercase
A: True

So, in your relevance above, you cast computer name as lowercase, but it appears you’re not casting the search strings as lowercase. Try something like:

(version of client >= "6.0.0.0") AND (exists true whose (if true then ((if true then (exists (operating system) whose (it as string as lowercase contains "Win2012" as lowercase)) else false) AND (it starts with "XXX" as lowercase or it starts with "XXX" as lowercase) of (computer name as lowercase)) else false))

2 Likes

Makes total sense now. Thanks for your explanation.

1 Like