(imported topic written by djorlett91)
I’ve done several searches for this and have not found a related one, so either this means that the solution very obvious, or I missed the post where this question was already asked. So I apologize for the redundancy that may or may not be there.
That said
My relevance query is data driven based on a couple of other more simple queries that gets me to a list of hosts that are contained in a group or set. I am looking for a result set related to a property on a host such that my query looks like this:
(name of it, ip address of it, values of results(it, bes property \
"netstat output\")) of bes computers whose (name of it = \"{0}\")
where the {0} is subbed out in the iterative loop on the aforementioned set or group. My problem is when I get a host who does not report their ip for whatever reason the query comes back with:
“Error: Singular expression refers to non-unique object”
Which I am interpreting to mean the ip is not there. Low and behold when I go and poke around in the database and on the host in general it is not there in my sample set because that host is hording its ip, cheeky thing that it is.
I thought using the exists keyword might get me there, something like
(name of it, (
if (exists ip address of it) then ip address of it
else
""), ...<the rest of the query>
but it does not match the ip4 return type off the request “ip address” which returns an ip4 object. so I am a bit stumped as to next steps.
any help on this would be greatly appreciated
-d