BF_dev
October 10, 2016, 8:46pm
1
I want to delete “@” from CPU brand name
cyyyyy @ 2.4
i want to extract cyyyy only
if (unique values of brand strings of processors contains “@”) then preceding text of first of unique… else unique…
but this doesn’t work with singular expression error
Hello!
Give this a shot:
Q: (preceding text of first "@" of it | it) of brand strings of main processor
Essentially we are saying, give me the preceding text of the first @ of the brand string but if that’s an error then just give me the brand string.
2 Likes
jgstew
October 10, 2016, 8:52pm
3
Try this:
unique values of family names of main processors
I was also going to add what @strawgate said, but he beat me:
unique values of (it as trimmed string) of (preceding text of first "@" of it | it) of brand strings of main processors
1 Like
Aram
October 10, 2016, 8:56pm
4
One reference that may be useful here is how to address errors that you might encounter with relevance expressions. Please see:
IBM Documentation for the specific message in question, and the following for more general guidance:
Errors
This topic gives a description of relevance inspector error messages along with possible reasons for each error.
Singular Expression Refers to Non-Existent Object
This is probably the most common error message you will receive. It usually results from querying a property of an object that does not exist, or querying a non-existent property of an object.
For example, the query:
Q: version of file "misspelled.dll" of folder "c:\temp"
E: Singular expression refers to non-existent object.…
BF_dev
October 10, 2016, 9:18pm
5
Thanks a lot guys, it works !
One more question how can i delete the white space from the output string “trimmed is only working in the start ans beginning”
jgstew
October 10, 2016, 9:19pm
6
This should take spaces away from beginning and end of a string:
BF_dev
October 10, 2016, 9:21pm
7
The white space is at the middle of the string
If you would like to strip all white space from the string you can use…
concatenations of substrings separated by " " of unique values of (it as trimmed string) of (preceding text of first "@" of it | it) of brand strings of main processors
BF_dev
October 10, 2016, 9:33pm
9
How to replace the “Tab” with “space” ?
BF_dev
October 10, 2016, 9:35pm
10
Intel® Xen® CPU X5
here an example, tab between CPU and X5
Can you try this?
concatenations of substrings separated by (character 9) of substrings separated by " " of unique values of (it as trimmed string) of (preceding text of first "@" of it | it) of brand strings of main processors
AlanM
October 10, 2016, 9:45pm
12
Have you looked at "family name of <processor>"
as well?
https://developer.bigfix.com/relevance/reference/processor.html#family-name-of-processor-string
Its often derived from the brand name and is usually a friendlier/shorter name
2 Likes