Im having a bit of trouble getting my head around this, so i was hoping someone could give me a hint:
Im trying to get a list of computernames not having filled in a given custom property. In this example the property is named xxx, and my shot at it is this:
(name of it) of
(bes computers
whose (not exists (properties of property results of it whose (name of it equals "xxx")))
)
I expected this relevance to return a list of all my computers not having the xxx defined/filled in, but none is shown. I have seen others do something like what i want in the web reports. But im doing this through the SOAP/REST api.
I don’t think this will work well, especially for many endpoints. Session relevance can be very inefficient depending on how it is written.
You can get the set of computers that have reported into a particular property with (reported computer set of ) which will give you the set of computers you do not want. I’m not sure how to get the opposite set of computers… the set of computers not within that set. I don’t know if it is as simple as adding a “not” in front of a computer set to get what you are looking for.
I could not get it to work with the “not exists”- syntax. Maybe because the xxx-field was actually defined, but had a status/value of “”.
The relevance i ended up with is like this:
(
name of item 0 of it ,
concatenation "," of values of result (item 0 of it , item 1 of it)
)
of
(
bes computers whose ( device type of it equals "Mobile")
, bes properties whose( name of it = "User Name")
, bes properties whose( name of it = "xxx" )
)
whose
(
exists result ( item 0 of it , item 1 of it)
and exists result ( item 0 of it , item 2 of it )
and not exists values of result ( item 0 of it , item 2 of it )
)
Only drawback here is that i get the values out multiple times as unique does not seem to work on sets?