Session relevance query for Computer Groups

Hello,

I’m trying to edit the source of the Schedulable Compliance by Computer report (Reference: Report Available: Schedulable Compliance by Computer or Content). I’d like the report to have the “Computer Groups” column as well.

Can someone please help me with the relevance query?

<?relevance trs of htmls (unique values of (it as string) of (td of (id of computer of it as string & id of fixlet of it as string) & td of (id of computer of it as string) & td of (if exists name of computer of it then name of computer of it else "") & td of (if exists operating system of computer of it then operating system of computer of it else "") & td of (if exists ip addresses of computer of it then concatenations (html "
") of (ip addresses of computer of it as string) else html "") & td of (if exists last report time of computer of it then (((year of it as string & "/" & month of it as two digits & "/" & day_of_month of it as two digits) of date (local time zone) of it & " " & (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of last report time of computer of it) else ("")) & td of (if (exists first became relevant of it) then ("1") else ("0")) & td of (if (exists Last Became NonRelevant of it and not relevant flag of it) then "1" else "0") & td of (if (exists Last Became Relevant of it and Relevant Flag of it) then "1" else "0")) of results of bes fixlets) ?>

I added the following within the query-

& td of (if exists computer groups of computer of it then computer groups of computer of it else “”)

But it gave the error -
Error in the Session Relevance: The operator “computer groups” is not defined.

The property with computer groups is called bes computer groups and there could be multiple, like IP addresses, so you would do something like this:

& td of (if exists bes computer groups of computer of it then concatenations (html "<br>") of (names of bes computer groups of computer of it as string) else html "")
1 Like

Thank you, Steve!

I tried using your query but that just gave a blank error…

You probably need to share the entire line of code to check if it was added correctly. You can also test the relevance stmt (the part between <?relevance and ?> on the QNA page in Web Reports: http://wrserver/webreports?page=QNA

Not sure if anyone would be able to help me with this?

I basically want to include a Computer Group column to the custom report developed by Lee Wei.

I added the following relevance query to the source -

<?relevance trs of htmls (unique values of (it as string) of (td of (id of computer of it as string & id of fixlet of it as string) & td of (id of computer of it as string) & td of (if exists name of computer of it then name of computer of it else "") & td of (if exists bes computer groups of computer of it then concatenations (html "
") of (names of bes computer groups of computer of it as string) else html "") & td of (if exists operating system of computer of it then operating system of computer of it else "") & td of (if exists ip addresses of computer of it then concatenations (html "
") of (ip addresses of computer of it as string) else html "") & td of (if exists last report time of computer of it then (((year of it as string & "/" & month of it as two digits & "/" & day_of_month of it as two digits) of date (local time zone) of it & " " & (two digit hour of it as string & ":" & two digit minute of it as string & ":" & two digit second of it as string) of time (local time zone) of it) of last report time of computer of it) else ("")) & td of (if (exists first became relevant of it) then ("1") else ("0")) & td of (if (exists Last Became NonRelevant of it and not relevant flag of it) then "1" else "0") & td of (if (exists Last Became Relevant of it and Relevant Flag of it) then "1" else "0")) of results of bes fixlets) ?>

Now the report is messed up with the Computer Groups showing fixlet ID and fixlet instead of Computer Group name. Even the columns in the graph chart moved, for example, the Applicable fixlets count is 497 and Installed fixlets count is 458.

This is relevant and good discussion for me.

The JavaScript in this custom report uses hard-coded column numbers when performing the various calculations, so inserting a new column leads to the errors @vhenry reported. Theoretically, the computer group information could be concatenated with the computer name in the first column, but when I tried to do so, I found a problem with web reports.

If there is any kind of Content filter applied to the Custom Report, the following relevance always evaluates to false, even when it shouldn’t:

exists bes computer groups of computers of results of bes fixlets

@steve, is this a bug?

2 Likes