Session relevance from multiple results properties

(imported topic written by PSanesi)

Hi everyone,

I’m trying to collect some data from multiple results properties.

Here is a brief example generated with excel connector:

( item 0 of it as string & “$x$” &

            item 1 of it as string  & "$x$" &


            item 2 of it as string )

of (

            (if (exists result (item 0 of it, item 1 of it) )


                           then (values of result (item 0 of it, item 1 of it))


                           else ("<none>")),


            (if (exists result (item 0 of it, item 2 of it) )


                           then (values of result (item 0 of it, item 2 of it))


                           else ("<none>")),


            (if (exists result (item 0 of it, item 3 of it) )


                           then (values of result (item 0 of it, item 3 of it))


                           else ("<none>")))

of (

            bes computers,


            bes property "Computer Name",


            bes property "Network",


            bes property "Subnet Address")

The problem here is that for every Network Adapter and every Subnet, the query will return a row.

E.g.: A wks with two Network Adapter ( and two Subnets), will generate 4 rows. I’m trying to achieve only rows whose value of Subnet is included in Network property (this property include Network Type, MAC, Gateway Address, IP, Netmask). A sort of pairing from the results of the two properties.

I need an output like this:

ComputerName - Network Type (preceding text of first “|”) - Subnet

with only the Network Type pertaining to the Subnet.

Is it this an achievable task (…and I don’t see the solution)?

Thanks everyone for possible suggestions!

Bye, Paolo

(imported comment written by zpt8mjs)

Paolo,

I’m not sure how you would get this relevance into the Excel Connector, but you can concatenate strings so that you only generate a single line for each hostname.

(
item
0
of
it
as
string

&
"$x$"
&

item
1
of
it
as
string

&
"$x$"
&

item
2
of
it
as
string

)

of

(

names

of
item
0
of
it,

(
concatenation

"|"
of
(
values

of
result

(
item
0
of
it,
item
1
of
it
)
as
string

))
|
""
,

(
concatenation

"|"
of
(
values

of
result

(
item
0
of
it,
item
2
of
it
)
as
string

))
|
""

)

of

(

bes computers
,

bes property

"Network
Adapter

Windows"
,

bes property

“Subnet
Address”

)

Hope this helps

(imported comment written by PSanesi)

Hi,

Thanks for your reply.

I just used excel connector as an example. It could be a web report . What’s important is that it’s a session relevance.

Concatenation isn’t a solution in my case. I explain better the why.

I need to retrieve the network adapter type (provided by “Network” property) binded to every subnet (provided by “Subnet Address” poroperty) in a computer. Output of “Network” property is like this --> “Network Type | MAC Addr | Default Gateway| IP Address | netmask”.

So, because first 3 octets of subnet address, from “Subnet Address” property, are contained in a a row of “Network” property output, I would like to have in output just that row (or better, the Network Type included in that row) together with its specific subnet address .

Up to now I didn’t succeed in this task. I don’t understand if I’m in front of a relevance limit or my personal limit :slight_smile:

Hope I gave you enough details.

Thanks anyway to you and any other who will contribute.

Bye, Paolo