Relevance works sometimes

I have a simple report that shows me systems that are not reporting into BigFix for more than 1 day. I use the provided filters to select which group i’m interested in. It only works against some groups. I get error “Singular expression refers to non-unique object.” I have no idea why. Any help is appreciated.

<?relevance
(html "<table id=resultsTable class=sortable>" & html ("<th>Computer Name</th><th>IP Address</th><th>OS</th><th>Last Report Time</th>") & 
(it) & html "</table>"

) of concatenations of trs of (

td of (item 0 of it) &
td of (item 1 of it) &
td of (item 2 of it) &
td of (item 3 of it)

) of (

name of it,
ip address of it as string,
operating system of it,
last report time of it as string

) of computers of results whose (exists value whose (it as time < now - 1 * day) of it) of bes property "Last Report Time"

?>

There are several areas the query could be “hardened” but based on that message I think some of the computers are reporting multiple IP addresses.

Try changing

ip address of it as string,

To

concatenation "; " of (ip addresses of it as string),
1 Like

Didn’t seem to help. I still get that same error message

if i change name of it to nameS of it i’m good. But yes, you were correct. Multiple IP addresses was the issue. Thanks @JasonWalker!

Some quick additional minor ‘hardening’ suggestions:

<?relevance
(html "<table id=resultsTable class=sortable>" & html ("<th>Computer Name</th><th>IP Address</th><th>OS</th><th>Last Report Time</th>") & 
(it) & html "</table>"

) of concatenations of trs of (

td of (item 0 of it) &
td of (item 1 of it) &
td of (item 2 of it) &
td of (item 3 of it)

) of (

name of it | "n/a",
concatenation "; " of (ip addresses of it as string) | "n/a",
operating system of it | "n/a",
last report time of it as string | "n/a"

) of computers of results whose (exists value whose (it as time < now - 1 * day) of it) of bes property "Last Report Time" whose (reserved flag of it)

?>
1 Like

Thanks @Aram! Much appreciated.

1 Like