Filter out agent type proxy

I have the following relevance query:

<?relevance
(id of item 0 of it as string, 
(name of item 0 of it | "?"), 
((value of client setting whose (name of it = "Cloud Tags") of item 0 of it)|""), 
(concatenation ";;" of (elements of set of values of result(item 0 of it, item 1 of it))|"")) 
whose (item 2 of it != item 3 of it) 
of (bes computers, bes property "Cloud Tags")
?>

I want to modify it so it only returns systems with agent type Native. This isn’t working. I would appreciate any suggestions.

<?relevance
(id of item 0 of it as string, 
(name of item 0 of it | "?"), 
((value of client setting whose (name of it = "Cloud Tags") of item 0 of it)|""), 
(concatenation ";;" of (elements of set of values of result(item 0 of it, item 1 of it))|"")) 
whose (item 2 of it != item 3 of it and
agent type of item 0 of it does not contain "Proxy"
) 
of (bes computers, bes property "Cloud Tags")
?>

On the client side, for over 4 years now, we have used Agent Type = Native

Our most common way
image

This also works
image

BES Console then spits out this code.

(version of client >= “6.0.0.0”) AND (exists true whose (if true then (exists (if exists true whose (if true then in proxy agent context else false) then "Proxy - " & data source else “Native”) whose (it as string as lowercase contains “Native” as lowercase)) else false))

For session relevance, I do

of bes computers whose (Agent Type of it contains “Native”)

1 Like

i keep getting error: The operator “agent type” is not defined.

Try this:

<?relevance 
(id of item 0 of it as string, (name of item 0 of it | "?"), ((value of client setting whose (name of it = "Cloud Tags") of item 0 of it)|""), (concatenation ";;" of (elements of set of values of result(item 0 of it, item 1 of it))|"")) whose (item 2 of it != item 3 of it) of (bes computers whose (agent type of it does not contain "Proxy"), bes property "Cloud Tags")
?>

I moved the whose (it) clause to the bes computers portion of the source tuple, rather than the output tuple that results from the query.

2 Likes