Hi all, I'm fairly new to SolarWinds and recently I needed some kind of Widget in a Summary View that would mimic what we get with the Tabular Universal Device Poller Widget in the Node Details view. After some digging, I came up with a SWQL query that does what's needed so I thought I'd share it with you guys since there isn't a lot of material about SWQL itself out there:

SELECT tmp4.NodeName as [Node Name], tmp1.SlotNumber as [Slot Number], tmp2.TapeName as [Tape Name], tmp3.UnitType as [Unit Type]
FROM Orion.NPM.CustomPollerAssignment cpa
INNER JOIN Orion.NPM.CustomPollers cp ON cp.CustomPollerId = cpa.CustomPollerId
INNER JOIN Orion.NPM.CustomPollerStatus cps ON cps.CustomPollerAssignmentId = cpa.CustomPollerAssignmentId
INNER JOIN Orion.Nodes cpn ON cpn.NodeID=cpa.NodeID
LEFT JOIN
(SELECT DISTINCT cps.STATUS as [SlotNumber], cps.RowID
FROM Orion.NPM.CustomPollerAssignment cpa
INNER JOIN Orion.NPM.CustomPollers cp ON cp.CustomPollerID=cpa.CustomPollerID
INNER JOIN Orion.NPM.CustomPollerStatus cps ON cps.CustomPollerAssignmentID=cpa.CustomPollerAssignmentID
INNER JOIN Orion.Nodes cpn ON cpn.NodeID=cpa.NodeID
WHERE cp.UniqueName = 'IBM_TL_TAPE_SLOT')
tmp1 on tmp1.RowId = cps.rowid
LEFT JOIN
(SELECT DISTINCT cps.Status as [TapeName], MAX(cps.DateTime) as DateTime, cps.RowID
FROM Orion.NPM.CustomPollerAssignment cpa
INNER JOIN Orion.NPM.CustomPollers cp ON cp.CustomPollerID=cpa.CustomPollerID
INNER JOIN Orion.NPM.CustomPollerStatus cps ON cps.CustomPollerAssignmentID=cpa.CustomPollerAssignmentID
INNER JOIN Orion.Nodes cpn ON cpn.NodeID=cpa.NodeID
WHERE cp.UniqueName = 'IBM_TL_Tape_name'
GROUP BY cps.Status, cps.RowID)
tmp2 on tmp2.Rowid = cps.RowID
LEFT JOIN
(SELECT DISTINCT cps.STATUS as [UnitType], cps.RowID
FROM Orion.NPM.CustomPollerAssignment cpa
INNER JOIN Orion.NPM.CustomPollers cp ON cp.CustomPollerID=cpa.CustomPollerID
INNER JOIN Orion.NPM.CustomPollerStatus cps ON cps.CustomPollerAssignmentID=cpa.CustomPollerAssignmentID
INNER JOIN Orion.Nodes cpn ON cpn.NodeID=cpa.NodeID
WHERE cp.UniqueName = 'UnitType')
tmp3 on tmp3.RowId = cps.rowid
LEFT JOIN (SELECT DISTINCT cpn.DisplayName as [NodeName], cps.RowID
FROM Orion.NPM.CustomPollerAssignment cpa
INNER JOIN Orion.NPM.CustomPollers cp ON cp.CustomPollerID=cpa.CustomPollerID
INNER JOIN Orion.NPM.CustomPollerStatus cps ON cps.CustomPollerAssignmentID=cpa.CustomPollerAssignmentID
INNER JOIN Orion.Nodes cpn ON cpn.NodeID=cpa.NodeID
WHERE cpn.DisplayName LIKE '%TAPE%')
tmp4 on tmp4.RowId = cps.rowid
WHERE cp.UniqueName = 'IBM_TL_TAPE_SLOT'
ORDER BY tmp1.SlotNumber + 0
Of course you would need to change some values in the WHERE clauses and also adapt this query to your naming convention in the last LEFT JOIN but this should be enough of a start in case someone has to come up with something like I did.
Also, if any of you gurus have any improvements I'm open to them.
Thank you everyone 