What is going on with this Relevance?

NOTE: Ignore this post. The Second Relevance is returning TRUE on too many systems so something else is wrong. I still need to determine why the Relevance that results in a TRUE response on my VDI is not returning ANY relevant systems for a Task using JUST that relevance. (I originally had other clauses to limit to just Windows of Operating System and where a setting didn’t exist but I removed them for testing/validation.

I have been trying to write a Fixlet for the last day and it was driving me nuts.

I have the following Relevance clause that works to gather computers in an Automatic Computer Group

(it as string contains "Citrix Display Only Adapter") of (String values of selects "Description from Win32_DisplayConfiguration" of wmi)

But when I added it to a Task so I could perform an action based on it, it never gathered any computers.

I recently changed it to …

exists (it as string contains "Citrix Display Only Adapter") of (String values of selects "Description from Win32_DisplayConfiguration" of wmi)

and now it gathers relevant systems to the Task.

WHY didn’t the first clause work but the second one did? They both return the same result in the Fixlet Debugger.

On my VDI, I can use the following Relevance …

Q: (String values of selects "Description from Win32_DisplayConfiguration" of wmi)
A: Citrix Display Only Adapter

Q: ((it as string as lowercase contains "citrix display only adapter") of (String values of selects "Description from Win32_DisplayConfiguration" of wmi))
A: True

and on my physical laptop …

Q: (String values of selects "Description from Win32_DisplayConfiguration" of wmi)
A: Intel(R) UHD Graphics

Q: ((it as string as lowercase contains "citrix display only adapter") of (String values of selects "Description from Win32_DisplayConfiguration" of wmi))
A: False

It’s because ‘False’ exists, you need to use a whose() clause to filter to only the results that are not False instead. These may illustrate

q: (String values of selects "Description from Win32_DisplayConfiguration" of wmi)
A: Microsoft Remote Display Adapter
T: 43.130 ms

q: (it as string contains "Citrix Display Only Adapter") of (String values of selects "Description from Win32_DisplayConfiguration" of wmi)
A: False
T: 37.308 ms

q: exists (it as string contains "Citrix Display Only Adapter") of (String values of selects "Description from Win32_DisplayConfiguration" of wmi)
A: True
T: 27.319 ms

q: exists False
A: True
T: 17.050 ms

q: exists (False) of (String values of selects "Description from Win32_DisplayConfiguration" of wmi)
A: True
T: 17.016 ms

q: exists (String values of selects "Description from Win32_DisplayConfiguration" of wmi) whose (it as string contains "Citrix Display Only Adapter")
A: False
T: 8.611 ms
1 Like

Yeah, I realized my mistake with adding the “exists” clause to the statement.

My problem is that I have the clause …

((it as string as lowercase contains "citrix display only adapter") of (String values of selects "Description from Win32_DisplayConfiguration" of wmi))

that when I add it to an Analysis, it returns TRUE for over 1300 systems, but when I set it as a Relevance Clause in a Task, NOTHING comes back as Relevant.

Hm. May be a real edge-case here, but I suspect it could be a problem that the result type is a plural, which can have some issues when it’s AND’d against the other relevance clauses.

If you try using my last query with ‘EXISTS’ does that work? That returns a singular boolean rather than a plural.

We don’t have a really good way to present that kind of relevance eval problem, unfortunately, aside from debug-level logging on the client. One thing you could try is to ‘Take Action’ on the task, and copy the generated applicability relevance from the Take Action dialog. That’s the final generated relevance that is all of the clauses AND’d and grouped together, occasionally that exposes a problem combining the clauses due to plural results.

I think I found it.

When I changed the clause to …

Q: IF ((it as string as lowercase contains "citrix display only adapter") of unique values of (String values of select "Description from Win32_DisplayConfiguration" of wmi)) THEN (TRUE) ELSE (FALSE)

I got an error …

E: A singular expression is required.

Changing the clause to …

Exists String values whose (it as string as lowercase contains "citrix display only adapter") of selects "Description from Win32_DisplayConfiguration" of wmi

is returning results.

What was hanging me up was that the Fixlet Debugger was returning TRUE on my VDI where I was testing, and the Fixlet returned NOTHING, and that was with Fixlet Debugger configured to have the local client process the queries. Strange.