/build/static/layout/Breadcrumb_cap_w.png

KACE Product Support Question


Need Assistance Writing a KACE Report

12/02/2016 842 views
I'm trying to create a fairly unique report and I have no idea where to start.

I'd like to determine how many systems in KACE are assigned to the same user, by way of the System Description field.

In my organization, our System Descriptions look something like this: John Smith - Sacramento Office

We need a report that shows ONLY systems that have two or more System Descriptions that are the same.

For example, if we rolled a PC to John Smith a few years ago and also rolled a laptop to him 6 months ago, we would want John Smith's systems to show on this report, as he has two assigned to him.

This seems difficult because, for one thing, we could have system number 1 Description as "John Smith - Sacramento Office" and his second system could be "John Smith - Bay Area Office", so it couldn't be an exact comparison of the entire System Description.

Any assistance with this is very much appreciated.

Thanks in advance,
Cameron


Answer Summary:
SELECT SUBSTRING_INDEX(SYSTEM_DESCRIPTION,' - ', 1) AS myUser, COUNT(*) AS deviceCount, GROUP_CONCAT(NAME) AS `Computer Names` FROM MACHINE GROUP BY myUser HAVING deviceCount > 1
3 Comments   [ + ] Show comments

Comments

  • Is there always a dash between the user's name and location?
  • Yes, there is. That part is consistent.
  • Do you ever include a middle name? Are there any employees with hyphenated last names?
    • No, we never include a middle name. Yes, there are a handful of users with hyphenated last names but they would never have spaces on the sides of those hyphens, whereas the hyphens in the System Descriptions always have one space before and one space after the hyphen.

Answer Chosen by the Author

2
How about this:
SELECT SUBSTRING_INDEX(SYSTEM_DESCRIPTION,' - ', 1) AS myUser,
       COUNT(*) AS deviceCount,
       GROUP_CONCAT(NAME) AS `Computer Names`
FROM MACHINE
GROUP BY myUser
HAVING deviceCount > 1
Answered 12/07/2016 by: JasonEgg
Red Belt

  • This is awesome and exactly what I need. You have my sincere gratitude! Thank you very much for helping me out with this. It's much easier than sorting through 2,000 system descriptions! manually.

All Answers

0
What you appear to be wanting to do is much more akin to an asset management process rather than an inventory manipulation, in other words if in the Asset for the inventory PC you created a user field you would be able to assign the device to John Smith. Once this value is in place you can report on the assets that are assigned to John. Always with the location in your description the better way of handling that is to use the Asset-Location field added to the asset record, so that you can still assign multiple devices to John Smith, but each device could also be associated with a different location.

If this data is updated by the techs when they assign or move kit this all rolls up top better reporting in particular from a starters and leavers perspective
Answered 12/08/2016 by: Hobbsy
Red Belt

  • Thank you for this suggestion. We do use an Environmental Variable to track users, as well, and it is much easier, but it doesn't always get updated by the techs when they re-roll the system to a new user, so that's why I needed this System Description report. Good lookin' out.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ