cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
aplechaty
Engaged Sweeper II
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.
1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
tblAssetCustom.State

You can refer to tblState for the list of state descriptions. Given your stated requirement, you want
WHERE
tblAssetCustom.State = 1
to limit selection to only active assets.

View solution in original post

3 REPLIES 3
RCorbeil
Honored Sweeper II
Start with this as its own report:
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
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.
aplechaty
Engaged Sweeper II
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
RCorbeil
Honored Sweeper II
tblAssetCustom.State

You can refer to tblState for the list of state descriptions. Given your stated requirement, you want
WHERE
tblAssetCustom.State = 1
to limit selection to only active assets.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now