I’m trying to add a column to this query that will return the list of all computer groups each system is a member of. I’m struggling…
(td of (item 0 of it) & td of (item 1 of it) & td of (item 2 of it) & td of (item 3 of it) & td of (item 4 of it) & td of (item 5 of it)) of (
name of it | "n/a",
concatenation "; " of (names of bes computer groups of computer of it as string) | "n/a",
concatenation "; " of (ip addresses of it as string) | "n/a",
operating system of it | "n/a",
relay server of it as string | "n/a",
last report time of it as string | "n/a"
) of (
elements of intersection of ((sets of items 0 of (computers of it , values whose (it as lowercase contains "site1") of it) of results of bes property "Subscribed Sites")))
when you add relevance as a property in BigFix, it is evaluated on the client side. But this thread is related to session relevance, which is to fetch results from BigFix server.
You can take a look into below post for RP relevance:
<?relevance
(td of (item 0 of it) & td of (item 1 of it) & td of (item 2 of it) & td of (item 3 of it) & td of (item 4 of it) & td of (item 5 of it)) of (
name of it | "n/a",
concatenation "; " of (names of bes computer groups of it as string) | "n/a",
concatenation "; " of (ip addresses of it as string) | "n/a",
operating system of it | "n/a",
relay server of it as string | "n/a",
last report time of it as string | "n/a"
) of (
elements of intersection of ((sets of items 0 of (computers of it , values whose (it as lowercase contains "site1") of it) of results of bes property "Subscribed Sites")))
?>
That thread actually had a couple of separate pieces of relevance in the query. The check for `__Group_X_xxxx’ settings only applies to Manual (and possibly Server-Based) groups.
For Automatic Groups you have to check the headers of relevant fixlets -
(unique values of it) of ((values of headers "subject" of relevant fixlets whose (value of header "X-Fixlet-Type" of it = "ComputerGroup") of sites)
Finally, this relevance as a property discovers all 3 types of groups:
(if exists ((settings of client) whose (it as string contains "__Group_0_" and it as string contains "=True")) then
(following texts of substrings "__Group_0_" of preceding texts of substrings "=True" of (((settings of client) whose
(it as string contains "__Group_0_" and it as string contains "True")) as string)) else "")
; (it & " serverbased") of (server based groups of client as string as lowercase); (it & " automatic") of (unique values of it) of ((values of headers "subject" of relevant fixlets whose (value of header "X-Fixlet-Type" of it = "ComputerGroup") of sites))