I’m trying to get the name of the issuer for the following query but noticed there is no issuer inspector property for action results:
("Computer Name: " & name of computer of it, "Action: " & name of action of it , "Issued: " & start time of it as string, "Status: " & detailed status of it) of action results whose (start time of it > now - 10 * day) of bes computers whose (name of it as lowercase starts with “ComputerName”)
Is there a way to get this using the action inspector ?
Thanks. Here’s my dilemma, I can get all the properties that I want when I query the bes action except for a specified computer and I can get all the properties of bes action result except for a specific computer using the code I posted in this thread, What am I missing here? Is I possible to fit the bes action in the code that I posted to query the name of issuer of it?
That’s because the action is issued (and therefore has an issuer) not the result(s) of the action
(
"Computer Name: " & name of computer of it , "Action: " & name of action of it , "Issued: " & start time of it as string , "Status: " & detailed status of it , "Issuer: " & name of issuer of action of it
)
of action results
whose
(
start time of it > now - 10 * day
)
of bes computers
whose
(
name of it as lowercase starts with "blah"
)
You have to walk up the tree - the action result has an action property, the action object in its turn has an issuer, which is a bes user object and that has a name property.
You then need to read/construct it from right to left.
It is because the object you start with is a bes computer. From then on you derive successive objects as properties of the current object.
The computer object has an “action results” property, which is of type “bes action result”.
Although the name of the property is related to the name of the type this isn’t always the case - for instance, an action object has an “issuer” property which is of type “bes user” which then has a property “name” of type “string”