Relevance query (Web Report API)

Hello all. I have written a relevance query to fetch a customized Patch Report in my environment. Now the requirement is to add another column which must contain “Free Disk Space of system Drive” . But now i can not make out how i can add this in my existing query. My existing query is given below :slight_smile:

(IDs of Actions of it, Names of Issuers of Actions of it,
Names of Actions of it, States of Actions of it, Times Issued of Actions of it,
Names of Computers of it, Operating Systems of Computers of it, IP Addresses of
Computers of it, Last Report Times of Computers of it, Detailed Status of
it,Status of it,Names of member actions of actions of it) of
results whose (((Name of Action of it as lowercase starts with
"2016p4") OR (Name of Action of it as lowercase starts with
"2016p5"))) of bes actions whose ((start date of it = ("17 apr
2016") as date) OR ((start date of it = (“18 apr 2016”) as
date)))

Please help me on this. As it is very urgent.

The existing properties from computers you have are directly available from the BES Computer inspector.
However, many properties are available only via an indirect statement referencing the results of a property.
With the example below, you can replace “Free Space on System Drive” with other properties and you can extract other information.

(
    IDs of Actions of it, 
    Names of Issuers of Actions of it,
    Names of Actions of it, 
    States of Actions of it, 
    Times Issued of Actions of it,
    Names of Computers of it, 
    Operating Systems of Computers of it, 
    IP Addresses of Computers of it, 
    Last Report Times of Computers of it, 
    value of result from 
            (bes property whose (name of it = "Free Space on System Drive")) 
        of computer of it,
    Detailed Status of it,
    Status of it,
    Names of member actions of actions of it
) of
results whose (
        (Name of Action of it as lowercase starts with "2016p4") OR 
        (Name of Action of it as lowercase starts with "2016p5")
) of 
bes actions whose (
        (start date of it = ("17 apr 2016") as date) OR 
        (start date of it = ("18 apr 2016") as date)
)


Thanks LeeWei I will try it and let you know

Hello leewei , query is returning o results on relevance tester.

Please check

I have made this below given query but getting error of “Singular Expression refers to nonexistent object” error.

((values of result (item 0 of it , item 1 of it)),(values of result (item 0 of it , item 2 of it)),(values of results (item 0 of it , item 3 of it)), (values of results (item 0 of it , item 4 of it))) of (bes computers,bes property “Computer Name” , bes property whose (name of it = “OS”) , bes property “Last Report Time” , bes property “Free Space on System Drive”)

Please help me on this.

It looks like you are trying retrieve various properties for the BES Computer object.

Here is an example with a few important variations.

(
    name of it,
    operating system of it,
    last report time of it,
    value of result from (bes property "Computer Name") of it,
    value of result from (bes property "Free Space on System Drive") of it,
    value of result from (bes property whose (name of it = "Last Report Time")) of it,
    concatenation "; " of values of results from (bes property whose (name of it = "IP Address")) of it
) of bes computers

The first 3 properties “name”, “operating system”, and “last report time” are direct properties of the BES Computer object, which is why we can access them directly.

The next forms "values of results from of " allows you to retrieve ANY properties.

I added another example with “concatenation” to show what happens when a property return multiple rows (e.g. multiple IP addresses).

3 Likes

Thanks Leewei. Query is working fine now.