FInd Strings after separator (comma)

That implies you’re calling something in a singular way, which must have exactly one result. Plural result would give you a different message, so it sounds like you’re calling for something that doesn’t exist…

All your ‘values of results’ are plurals, so that won’t trigger the message. What’s left are

bes property "Log4j-2.16"
bes property "Implementation Version"
bes property "Site"
bes property "OS"
bes property "Last Report Time"
name
hostname

I know the “Last Report Time” and “OS” Properties exist because they’re built-in. If a computer had not reported its OS then you’d get an error looking for 'value of result (it, bes property “OS”)` in the singular form, but because you’re using ‘values of results’ a missing value would just drop this computer out of the result set without throwing the error.

Assuming the “Log4j-2.16”, “Implementation Version”, and “Site” properties actually exist, they follow the same lookup pattern. Missing result would discard the computer without throwing an error.

So that leaves “name” and “hostname”. Weird as it may seem, there are cases where a brand-new computer may appear in the server, but has not (yet) reported those values. That’s a frustrating edge-case that only appears sometimes and not other times when running the same query.

The way around it is to use the pipe operator " | " to catch an error and substitute an alternate result when that error occurs. You use it like
name of bes computer | 'Not Reported'

So try

(name of it | "Not Reported", hostname of it | "Not Reported", values of results (it, bes property “Log4j-2.16”), values of results (it, bes property “Implementation Version”), values of results (it, bes property “Site”), values of results (it, bes property “OS”), values of results (it, bes property “Last Report Time”)) of bes computers

Then, since you’re pulling multiple properties for all computers, I really recommend you read through the posting at Efficient Session Relevance Query for Computer Properties for a pattern to doing that lookup much more efficiently. It’s detailed and lengthy, but very fast, and handles all of the “missing results / duplicate property / property not existing” edge cases.

2 Likes