Relevance - additional filter

I need assistance modifying this relevance query. I want to add an additional filter to only return results based on operating system. For example win2022. I tried just adding " and
(operating system of computer of it as lowercase = “win2022”)" but i suspect since i’m filtering based on “results of bes action” i can’t do this (based on the errors i keep getting lol). How do i filter on the computer property in addition to the bes actions?

<?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) & td of (item 6 of it) & td of (item 7 of it) & td of (item 8 of it)) of 
(
  id of action of it as string | "n/a",
  name of action of it | "n/a",
  name of computer of it | "n/a",
  (if (exists subscribed sites whose (custom site flag of it = true) of computer of it) then (name of subscribed sites whose (custom site flag of it = true) of computer of it as string) else "No Custom Site"),
  (concatenation "; " of (names of bes computer groups of computer of it as string) | "No Computer Group"),
  id of computer of it as string | "n/a",
  operating system of computer of it | "n/a",
  detailed statuses of it,
  last report time of computer of it as string | "n/a"
) of results of bes actions whose ((id of it = 2184070) and State of it as lowercase is contained by "open|expired" )

?>

This does what you want (I think):

(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) & td of (item 6 of it) & td of (item 7 of it) & td of (item 8 of it)) of 
(
  id of action of it as string | "n/a",
  name of action of it | "n/a",
  name of computer of it | "n/a",
  (if (exists subscribed sites whose (custom site flag of it = true) of computer of it) then (name of subscribed sites whose (custom site flag of it = true) of computer of it as string) else "No Custom Site"),
  (concatenation "; " of (names of bes computer groups of computer of it as string) | "No Computer Group"),
  id of computer of it as string | "n/a",
  operating system of computer of it | "n/a",
  detailed statuses of it,
  last report time of computer of it as string | "n/a"
) of results from (bes computers whose (operating system of it as lowercase contains "win2022"))
of bes actions whose ((id of it = 2184070) and State of it as lowercase is contained by "open|expired" )

2 Likes

yes, it sure does. Thanks a lot for the help. Really appreciate it!