Hi,
I’m using the following query to get all properties if they exist or print “Null” if any doesn’t exist:
(
(if (exists result (item 0 of it, item 1 of it) and
exists values of result (item 0 of it, item 1 of it) )
then (concatenation “!” of values of result (item 0 of it, item 1 of it))
else (“Null”)),
(if (exists result (item 0 of it, item 2 of it) and
exists values of result (item 0 of it, item 2 of it) )
then (concatenation “!” of values of result (item 0 of it, item 2 of it))
else (“Null”)),
(if (exists result (item 0 of it, item 3 of it) and
exists values of result (item 0 of it, item 3 of it) )
then (concatenation “!” of values of result (item 0 of it, item 3 of it))
else (“Null”)),
(if (exists result (item 0 of it, item 4 of it) and
exists values of result (item 0 of it, item 4 of it) )
then (concatenation “!” of values of result (item 0 of it, item 4 of it))
else (“Null”)),
(if (exists result (item 0 of it, item 5 of it) and
exists values of result (item 0 of it, item 5 of it) )
then (concatenation “!” of values of result (item 0 of it, item 5 of it))
else (“Null”)),
(if (exists result (item 0 of it, item 6 of it) and
exists values of result (item 0 of it, item 6 of it) )
then (concatenation “!” of values of result (item 0 of it, item 6 of it))
else (“Null”)),
(if (exists result (item 0 of it, item 7 of it) and
exists values of result (item 0 of it, item 7 of it) )
then (concatenation “!” of values of result (item 0 of it, item 7 of it))
else (“XXX, 01 Jan 1900 00:00:00 /0000”))
)
of (
bes computers,
bes property “Computer Name”,
bes property “OS”,
bes property “IP Address”,
bes property “OS - Full Name”,
bes property “Location By IP Range”,
bes property “location”,
bes property “Last Report Time”
)
The problem is that I get a small amount of hosts with the name and properties, then a huge number of entries with all set to null.
If I use this query:
(name%20of%20it)%20of%20bes%20computers whose (exists name of it)
I get the exact number of computers.
I’m trying to understand why the main query is not giving all the computer names that exists and printing Null for almost all of them when the small query can actually print them out.
Any ideas?
Thanks,
Isaac