When I perform the test below on a TEM server that has never been configured with the custom property “Manufacturer”, I receive the message “Error: Singular expression refers to nonexistent object”.
((if (exists values of (results from (bes property “Manufacturer”) of it)) then values of (results from (bes property “Manufacturer”) of it) else “UNKNOWN”) ) of bes computers
Is there alternative query that would catch this condition?
A simple if/then/else statement will allow you to trap the error and deliver a more meaningful message. For example…
if (exists bes property whose (name of it = “Manufacturer”)) then (values of results from (bes property whose (name of it = “Manufacturer”)) of bes computers) else (“Property Does Not Exist”)