Session Relevance Help

(imported topic written by LouAlbano91)

Can someone please give me a clue?

I am trying to pull several properties using the SOAP interface for a particular machine.

This is an abbreviated version of the relevance I am using to pull info based on hostname:

(values of it as string) of (results (bes properties (“IP Address”), it)) of bes computers whose (name of it as string = “robust”)

The real query pulls more properties than that, I made that one simple to make life easier.

My problem comes in when I try this:

(values of it as string) of (results (bes properties (“Computer Name”), it)) of bes computers whose (ip address of it as string = “10.0.0.1”)

If a machine only has one IP, that works fine, but if it has two or more IPs it doesn’t match. I also tried:

(values of it as string) of (results (bes properties (“Computer Name”), it)) of bes computers whose (ip address of it as string contains “10.0.0.1”)

And various permutations thereof.

When I pull IP address info based on hostname, the session relevance tester says it returned two objects. I think the problem is that when a computer has two IPs, the multiple objects break my matching.

Anyone have an any ideas?

Thanks,

-Fran

(imported comment written by BenKus)

Hi Fran,

The trick is that when you are confronted with a list of results like this, you need to iterate across them again with a whose clause…

So you would try this:

(values of it as string) of (results (bes properties (“Computer Name”), it)) of bes computers whose (exist ip address whose (it = “10.0.0.1”) of it )

Ben

(imported comment written by LouAlbano91)

Good deal. That worked.

I remember this in the training. My problem is the time between training and the time that I started to do things with the product was too long to remember all of it.

Thanks,

-Fran