cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
crashff
Champion Sweeper
I like how LanSweeper auto-populates the asset relationship information between pc's and monitors and other devices during the scan process based on what's physically connected, but it is possible to have the user relationship auto-populate from the pc as well?

I'm trying to develop an individual user asset report to track who has what items attached to their computer, because monitors and external drives get traded around a lot without my knowledge.
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
On each computer the last logged on user is stored under tblAssets.Username and tblAssets.Userdomain in the database. We don't automatically create asset-user-relations. If you would like to create these automatically, you might be able to do this with an SQL script under Configuration\Database scripts, section Database scripts. However, we can't provide full support for this.

Alternatively consider using a custom report which lists items related to the last logged on user, like this example:

Select Top 1000000 tblAssets.AssetID,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblAssets.Lasttried,
tsysAssetRelationTypes.Name As Connection,
tConnected.AssetName As [Connected asset]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Left Join tblAssets tConnected On tConnected.AssetID =
tblAssetRelations.ChildAssetID
Left Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetRelations.Type
Where tblAssetCustom.State = 1 And Coalesce(tblAssets.Username, '') <> ''
Order By tblAssets.Username,
tblAssets.AssetName,
[Connected asset]

View solution in original post

2 REPLIES 2
crashff
Champion Sweeper
I will have to try it and see. I'm currently manually setting user-pc relations. My thought was that if a user-asset relation is set for a pc, then duplicate that same user relation to all assets connected to that pc - the monitors, etc.

The reason I cant use logins is because we have some machines that are shared among employees, but those employees still only have 1 specific workstation that is actually assigned to them. Using last logged on person would make a pair of monitors bounce back and forth between 3 different users.
Daniel_B
Lansweeper Alumni
On each computer the last logged on user is stored under tblAssets.Username and tblAssets.Userdomain in the database. We don't automatically create asset-user-relations. If you would like to create these automatically, you might be able to do this with an SQL script under Configuration\Database scripts, section Database scripts. However, we can't provide full support for this.

Alternatively consider using a custom report which lists items related to the last logged on user, like this example:

Select Top 1000000 tblAssets.AssetID,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.Lastseen,
tblAssets.Lasttried,
tsysAssetRelationTypes.Name As Connection,
tConnected.AssetName As [Connected asset]
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Left Join tblAssetRelations
On tblAssets.AssetID = tblAssetRelations.ParentAssetID
Left Join tblAssets tConnected On tConnected.AssetID =
tblAssetRelations.ChildAssetID
Left Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
tblAssetRelations.Type
Where tblAssetCustom.State = 1 And Coalesce(tblAssets.Username, '') <> ''
Order By tblAssets.Username,
tblAssets.AssetName,
[Connected asset]