I am trying to pull a report of machines reporting “pending restart” for certain actions along with some machine properties.
Here is what I have so far…
(trs of
(
td of (id of action of it as string) &
td of (if exists (name of computer of it) then (name of computer of it) else (“undefined”)) &
td of (id of computer of it as string) &
td of (IF (exists results(bes property “bes client version”, computer of it)) THEN (value of results(bes property “bes client version”, computer of it)) ELSE (“undefined”) ) &
td of (if (exists ip addresses of computer of it) then (concatenations ", " of (ip addresses of computer of it as string)) else (“undefined”)) &
td of (status of it as string )
)
)
of results
whose (status of it = bes action status pending restart)
of bes actions
whose (id of it = 186310 OR id of it = 192183 OR id of it = 192173 OR id of it = 192785 OR id of it = 191124 OR id of it = 192181)
The issue is I need to add a property called “Computer Type” and I have two properties called by this name. For the life of me I can not seem to get this to work. How can I identify the property I want and what is the syntax?
I did figure out a way to do it using the computer id and figured out the syntax, but I would be interested to see if anyone had a different method.
<table> <th>Action ID</th><th>Computer name</th><th>Computer id</th>><th>IP Address(es)</th><th>Action Status</th> <?Relevance (trs of ( td of (id of action of it as string) & td of (
if exists (name of computer of it) then (name of computer of it)
else (
"undefined")) & td of (id of computer of it as string) & td of (IF (exists result(bes property whose (id of it as string =
"2147483977, 48, 1"), computer of it)) THEN (value of result(bes property whose (id of it as string =
"2147483977, 48, 1"), computer of it)) ELSE (
"undefined") ) & td of (
if (exists ip addresses of computer of it) then (concatenations
", " of (ip addresses of computer of it as string))
else (
"undefined")) & td of (status of it as string ) ) ) of results whose (status of it = bes action status pending restart) of bes actions whose (id of it = 186310 OR id of it = 192183 OR id of it = 192173 OR id of it = 192785 OR id of it = 191124 OR id of it = 192181) ?> </table>
Yes… If there are multiple properties with the same name, then you should not use <bes property “somename”> because it will return the first one it finds… Using the ID as you did is a very good way to do it, or you could use the name + the source analysis name…