Want computer to appear in results multiple times, once for each IP

(imported topic written by SystemAdmin)

I am creating a report that will have sortable columns, including the computer name, the primary user, the last report time, and the IP.

Of course, the fact that some machines have multiple IP’s complicates things when it comes to sorting. My solution is to have a radio button (already implemented) that will allow the option to run the report with each IP as a separate result. This means that some computers will appear multiple times in the report, which is exactly what I am trying to accomplish.

A stripped version of what I have so far is below… can you show me how to return a unique result for each IP?

table of concatenation of ( trs of ( td of ( link of it ) & td of ( concatenation 
"," of (ip addresses of it as string) ) ) ) of ( BES Computers whose ( (name of it as lowercase contains 
"ComputerName" as lowercase) ) )

Thanks!

(imported comment written by BenKus)

You can use tuples (the “,”) to do the cross-product:

table of concatenation of (
trs of (
(td of item 0 of it & td of item 1 of it) of (
link of it, (ip addresses of it as string)
)
)
)
of (
BES Computers whose (
(name of it as lowercase contains “ComputerName” as lowercase)
)
)

Ben

(imported comment written by SystemAdmin)

Thank you Ben… exactly what I needed to complete my “report”. I guess I just don’t quite get tuples, I knew that’s what I needed, but I needed to see one using code I knew to understand how to implement it. All of the examples I found were related to something completely different and I found it hard to determine how the relevance worked.