Computers not containing a custom property

(imported topic written by JesperLarsen)

Hi

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.

/Jesper… puzzled

(imported comment written by jgstew)

Have you tried testing this in the BigFix Session Relevance Tester?

Try this:

(name of it) of

(bes computers

 whose (not exists (properties whose (name of it equals "xxx") of property results of it))

)

(imported comment written by jgstew)

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.

You may have better luck with this question over in the “
TEM Web Reports and Custom Reports
” forum which has more to do with session relevance than this forum. You can find it here:
https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0000-0000-0000-000000002699

(imported comment written by JesperLarsen)

Hey

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?

Performance on 1000’s of devices is… FAST

/Jesper