Session Relevance - join fixlet proprties with computer properties

I am attempting to write a session relevance clause to provide the following report. This will take a Baseline Name, and then report by Computer, the status of each Fixlet that exists in this Baseline). For example:

Computer Name
Fixlet Name
Severity
Category
Release Date
Applicable (Fixlet applicable to Computer? 1 = yes, 0 = no)
Installed (Fixlet installed on Computer? 1 = yes, 0 = no)
Outstanding (Fixlet outstanding for Computer?) 1 = yes, 0 = no)

So, there would be one row output per Computer per Fixlet from the Baseline.

I have been able to achieve this using the following:

(name of computer of it as string & “||” & name of fixlet of it as string & “||” & source severity of fixlet of it as string & “||” & category of fixlet of it as string & “||” & source release date of fixlet of it as string & “||” & (if (exists last became relevant of it) then (1) else (0)) as string & “||” & (if (exists last became nonrelevant of it and relevant flag of it = false) then (1) else (0) ) as string & “||” & (if (relevant flag of it = true) then (1) else (0) ) as string) of results of elements of unions of ((sets of source fixlets of components of component groups of bes fixlets whose (baseline flag of it = true and name of it = “MyBaseline”)))

This is working. However, I have a requirement to also include a Computer Property as well as the Computer Name. I am struggling to achieve this, because I don’t believe the Computer Properties are available, since I am only querying fixlet objects.

I assume I need to include some kind of sub-query/join to be able to query/join on the computer object for each computer found. However, I’ve been unsuccessful so far.

I have tried to include a sub clause such as:

(if (exists value of results (it, bes property “MyProperty”)) then (value of results (it, bes property “MyProperty”)) but this doesn’t work, as the bes property is not a property of the fixlet object.

I ultimately want my query to return:

Computer Name
MyProperty (value of Computer property called “MyProperty”)
Fixlet Name
Severity
Category
Release Date
Applicable (Fixlet applicable to Computer? 1 = yes, 0 = no)
Installed (Fixlet installed on Computer? 1 = yes, 0 = no)
Outstanding (Fixlet outstanding for Computer?) 1 = yes, 0 = no)

Please could anyone help?

@wolf359 -

Try adding something like this:

	(if exists(value of property results whose (name of property of it= "IP Address") of computer of it) then (concatenation "|" of values of property results whose (name of property of it= "IP Address") of computer of it as string) else ("na")),

Check out this great blog post from @brolly33 on retrieving multiple computer properties. Efficient, repeatable, and error handling along with a discussion of why it works.

https://www.ibm.com/developerworks/community/blogs/e9d21113-aa93-467e-ac77-a0d20a21eaec/entry/Session_Relevance_Computer_Properties_query_Efficiency?lang=en

4 Likes