Notification

Icon
Error

Active Assets Versus Non-Active - I am looking for the variable that denotes if a system is Active or not

Posted: Thursday, August 22, 2019 1:28:14 PM(UTC)
aplechaty

aplechaty

Member Original PosterPosts: 8
0
Like
This issue has been solved! Click here to view the solution
Does anyone know the location of the variable I can add to a report to see if a device is Active or Non-active? I want to make sure Non-active systems are not counting when i run licensing reports and such. Thanks in advance.
RC62N
#1RC62N Member Posts: 371  
posted: 8/22/2019 4:57:18 PM(UTC)
tblAssetCustom.State

You can refer to tblState for the list of state descriptions. Given your stated requirement, you want
Code:
WHERE
  tblAssetCustom.State = 1
to limit selection to only active assets.
aplechaty
#2aplechaty Member Original PosterPosts: 8  
posted: 8/23/2019 1:48:37 PM(UTC)
Thank you!

So if I want to create a report that does display Non-Active Assets

How would the statement read?

Where tblAssetCustom.State <> 1
RC62N
#3RC62N Member Posts: 371  
posted: 8/23/2019 9:29:26 PM(UTC)
Start with this as its own report:
Code:
SELECT *
FROM tblstate

That's the list of state values and their descriptive names. You'll see there that 1=Active, 2=Non-active, etc.

If you want to see only non-active assets, filter for tblAssetCustom.State=2.

If you'd prefer to filter using the descriptions, add the tblState table to your report and make your filters something like
Code:
WHERE
  tblState.Statename = 'Non-active'

Filtering on the tblAssetCustom.State value is more efficient (negligibly so, but still...) while filtering on tblState.Statename makes the query more legible. Pick your choose. Angel

Active Discussions

Lansweeper Lansweeper Reporting Old Assets as New
by  Jpatterson   Go to last post Go to first unread
Last post: Today at 8:09:00 PM(UTC)
Lansweeper Change History or Restore of Custom Reports?
by  GoHawks5  
Go to last post Go to first unread
Last post: Today at 4:20:52 PM(UTC)
Lansweeper agents can't create new tabs
by  Esben.D   Go to last post Go to first unread
Last post: Today at 3:51:07 PM(UTC)
Lansweeper Schedule/Calendar Ticket
by  enush  
Go to last post Go to first unread
Last post: Today at 3:46:21 PM(UTC)
Lansweeper Admins view all helpdesk tickets
by  Esben.D   Go to last post Go to first unread
Last post: Today at 3:44:50 PM(UTC)
Lansweeper Features Questions
by  datev   Go to last post Go to first unread
Last post: Today at 2:03:03 PM(UTC)
Lansweeper Assets disappearing
by  Ian.Prentice  
Go to last post Go to first unread
Last post: Today at 11:39:52 AM(UTC)