Is there a way to change a few things with the results I get?
1) I don't want locations that have nothing at them. We don't delete them.
2) Also I don't want retired items showing up at locations. Should only show items that have Status = production.
You could write a query to give what you need. I'm assuming you're talking about the Manage → Locations → List Locations screen?
What about the below for a simple query. Feel free to add/remove fields from the locations and system tables as you see fit (you can see these tables at menu → Admin → Database → List Tables).
SELECT locations.id AS `locations.id`, locations.name AS `locations.name`, locations.type AS `locations.type`, COUNT(system.id) AS `devices` FROM locations LEFT JOIN system ON (locations.id = system.location_id) WHERE @filter AND system.status = 'production';
Correct on the list locations screen.
Odd though that query only gives me one result and isn't what I am after as it only gives me the count. I am looking for exactly what List Locations does minus the things mentioned above.
I like in the really old OpenAudit where it -
Powered by a free Atlassian Confluence Open Source Project License granted to Opmantek. Evaluate Confluence today.