Search for blank output in EA

hkim
Contributor II

I must be missing something. I want to search for computers that have no output for certain EAs, and I can't get it to work. I can see a computer clearly in Inventory that matches my criteria but doesn't come up when I do an advanced search with a blank EA.

Thoughts?

7 REPLIES 7

BaddMann
Contributor

maybe include the XML?
<results></results>

Good question though.

In cases like this I use wild cards and tell it "not like".

So: EA Not like=%

That would give you anything that has nothing at all.
Might work, it might not, just thought I'd give you another avenue.

rmanly
Contributor III

I don't let that be an option.

Make your EA's with if; then else's then have a bad output for not matching like "No" or "Not Installed" or something like that. :)

hkim
Contributor II

I guess a better question is, how to setup a Smart Group for those computers that have not run that particular EA, other than tracking down which computers haven't checked in since the day the EA was made.

mm2270
Legendary Contributor III

This can be done in the case of a simple EA that has results like Yes, No or On, Off, etc.

You'd set up a query in the Smart Group like:

EA_Name  |  Not Like  |  Yes
and    EA_Name  |  Not Like  |  No

The "and" is important, Using "or" will return any Macs that have either value, naturally. You can add as many different possible returned results that you're aware of, all with And operators between them.

If on the other hand, your EA is designed to pull something unique to each Mac, say something like Uptime, this approach won't work. But in that case, have you tried using the wildcard approach that BaddMann mentioned? I haven't tried it myself, but it may work.

JPDyson
Valued Contributor

Seconding the above; I've used that very approach to determine if an EA has run.

The uptime example would be solved by "Not Like" with ":"

cvgs
Contributor II

As soon as you add an EA to your search criteria, you automatically restrict the result scope to only those clients that already have run that EA, regardless of that EA's value.

That is just the way the JSS SQL database is set up, and your only workaround is to write your EAs so that they never return an empty value but rather something like "n/a". That way you can discern clients not having run that EA from those having run it.

JPDyson
Valued Contributor

cvgs, excellent point - proves true on my end