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: 374  
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: 374  
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 Remove all users from old domain
by  cmuter   Go to last post Go to first unread
Last post: 9/20/2019 8:03:58 PM(UTC)
Lansweeper Static IP Address
by  cycleheat  
Go to last post Go to first unread
Last post: 9/20/2019 4:07:16 PM(UTC)
Lansweeper Bitlocker Encryption Recovery Key no information found
by  Stephane   Go to last post Go to first unread
Last post: 9/20/2019 2:26:19 PM(UTC)
Lansweeper InTune Scanning Issues
by  Esben.D  
Go to last post Go to first unread
Last post: 9/20/2019 12:34:59 PM(UTC)
Lansweeper Office 365 scanning issues
by  Esben.D   Go to last post Go to first unread
Last post: 9/20/2019 12:23:30 PM(UTC)
Lansweeper Hard Drive Tracking - Start to Finish
by  Lone Jedi  
Go to last post Go to first unread
Last post: 9/19/2019 8:11:56 PM(UTC)
Lansweeper Lansweeper Reporting Old Assets as New
by  Jpatterson   Go to last post Go to first unread
Last post: 9/19/2019 12:52:14 PM(UTC)
Lansweeper Cannot edit a ticket anymore
by  Esben.D  
Go to last post Go to first unread
Last post: 9/19/2019 12:32:42 PM(UTC)