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: 425  
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: 425  
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 Changes in the licensing model
by  mcbeathb   Go to last post Go to first unread
Last post: Today at 6:47:51 AM(UTC)
Lansweeper About Memory Changes
by  fjca  
Go to last post Go to first unread
Last post: Yesterday at 5:51:17 PM(UTC)
Lansweeper Wildcard in file scanning to get all files in a directory?
by  RKCar   Go to last post Go to first unread
Last post: Yesterday at 4:03:43 PM(UTC)
Lansweeper Wishlist is dead, no responses from LS staff.
by  RobertB  
Go to last post Go to first unread
Last post: Yesterday at 3:08:12 PM(UTC)
Lansweeper Deploy installer packages not working any more
by  richv   Go to last post Go to first unread
Last post: Yesterday at 3:06:19 PM(UTC)
Lansweeper File Scanning
by  RKCar  
Go to last post Go to first unread
Last post: Yesterday at 2:22:54 PM(UTC)
Lansweeper HP Warranty scan - broken for some products
by  zaty   Go to last post Go to first unread
Last post: Yesterday at 1:52:38 PM(UTC)
Lansweeper How to stop deployments ?
by  Leandro Martins  
Go to last post Go to first unread
Last post: Yesterday at 1:47:22 PM(UTC)