Custom Web Report pulling information from bes fixlets and bes computers

(imported topic written by SystemAdmin)

I’ve been trying to pound this out for a while now.

Essentially, what we want to do is take every fixlet for every endpoint that has become relevant in the last 30 days in it’s own line. Those lines would include pertinent information such as ip address, computer name, etc.

Each piece of information will be separated by a pipe “|”.

For clarification, I’ve put together the following pseudo code:

(ip address of bes computers) & 
"|" & (names of bes computers) & 
"|" & =====username==== & 
"|" & (values of results (bes property 
"_AgencyID", bes computers)) & 
"|" & (

if (value of result (bes property 
"Laptop Check (Universal)", bes computers)) = 
"True" then 
"Laptop" 

else 

if (operating system of bes computer) contains 
"Win2" then 
"Server" 

else 
"Desktop") & 
"|" & (id of fixlet of results of bes fixlets) & 
"|" & (name of fixlet of of results of bes fixlets) & 
"|" & (category of fixlet of results of bes fixlets) & 
"|" & (last became relevant of results of bes fixlets)

I still need clarification as to what the

====username===

section will be but if anyone could help with the rest I’m sure I’d be able to figure it out.

Any help would be appreciated.

(imported comment written by Lee Wei)

Here is an example that you can work from, but beware that the query will return a lot of results and will be very slow. It is best to first try with a small set of computers, and a small number of Fixlets. I have used Patches for Windows as an example, but you should probably go smaller.

( name of computer of it, concatenations 
"; " of (ip addresses of computer of it as string), values of results from (bes property whose (name of it = 
"User Name")) of computer of it, id of fixlet of it as string, name of fixlet of it, last became relevant of it ) of results ( bes computers, bes fixlets whose (display name of site of it = 
"Patches for Windows (English)")) whose (relevant flag of it and (now - last became relevant of it) < 30 * day )

Lee Wei

(imported comment written by SystemAdmin)

Thank you! I should be able to build off of this :slight_smile:

(imported comment written by SystemAdmin)

It seems to give good results on my test server, but in production it gives one result and then immediately after that first result I get the following error:

{code}Singular expression refers to non-unique object.{/code}

(imported comment written by Lee Wei)

We will have to look at your statement.

In the above example, if you have 2 properties with the same name “User Name”, then you will get the error.

So we will have to be more specific as to which “User Name” we want by including other filters, such as the site it is from, or using an ID.

Lee Wei

(imported comment written by SystemAdmin)

Using the following code code you gave us:

( concatenations 
"; " of (ip addresses of computer of it as string), name of computer of it, values of results from (bes property whose (name of it = 
"User Name")) of computer of it, values of results from (bes property whose (name of it = 
"_AgencyID")) of computer of it, values of results from (bes property whose (name of it = 
"Endpoint Role")) of computer of it, id of fixlet of it as string, name of fixlet of it, category of fixlet of it, source severity of fixlet of it, last became relevant of it ) of results ( bes computers, bes fixlets whose (display name of site of it contains 
" ")) whose (relevant flag of it and (now - last became relevant of it) < 30 * day )

In developement (version 8.2.1093.0)it gives us quite a few results and then ends in

Singular expression refers to non-unique object.

In production (version 8.1.551.0) it gives us one line of results (a complete line, nothing is missing) and appends immediately to the end

Singular expression refers to non-unique object.

(imported comment written by SystemAdmin)

Since I cannot edit:

I made a mistake on the production results. It ONLY shows the results:

Singular expression refers to non-unique object.

(imported comment written by Lee Wei)

Have you confirmed that the properties “User Name”, “_AgencyID” and “Endpoint Role” are unique?

You can use this statement to test:

number of bes properties whose (name of it = “User Name”)

If they are not unique, you need to specific another filter criteria, such as the site name or property ID.

Lee Wei

(imported comment written by SystemAdmin)

The User Name was indeed a duplicate property name. As such we went with:

values of results from (bes property whose (id of it = (2147495638,22,1))) of computer of it,

That wasn’t the only problem. I needed to also pluralize:

category of fixlet of it, source severity of fixlet of it,

So it became:

categories of fixlet of it, source severities of fixlet of it,

Everything is working fine now. Thanks :slight_smile:

(imported comment written by SystemAdmin)

Oh I should also add that I had separate lines if the User Name field had multiple results. As such I had to change it to:

(

if (it contains 
";") then (preceding text of first 
";" of it) 

else it) of (concatenation 
";" of values of (results (it, bes property whose (id of it = (2147495638,22,1))))) of computer of it,

P.s. I wish there was a way to edit posts :confused: