→ 🚀Are you a Lansweeper Champion?! Join our Contributor Program Sign up here!

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
luigirusso
Visitor Sweeper

Hi everyone,

I hope someone can help me.

I use lansweeper v. 12.2.0.4 on prem.

I created a query that shows in a report the Supremo ID of each computer scanned.

Now I need to show the Supremo ID in a custom field of the computer dashboard, I understood that the custom field, for example custom 1, is in "TableassetCustom.Custom1".

this is the query

 

 

 

Select Top 1000000 tblassets.AssetName,
Registry.RegKey,
Registry.ValueName,
Case
When Len(Registry.Value) = 9 Then Cast(Registry.Value As varchar(9))
When Len(Registry.Value) = 8 Then '0' + Cast(Registry.Value As varchar(8))
When Len(Registry.Value) = 7 Then '00' + Cast(Registry.Value As varchar(7))
When Len(Registry.Value) = 6 Then '000' + Cast(Registry.Value As varchar(6))
Else Registry.Value
End As ClientID,
tblassets.Username
From tblassets
Left Join tblRegistry As Registry On tblassets.AssetID = Registry.AssetID
Inner Join tblAssetCustom On tblassets.AssetID = tblAssetCustom.AssetID
Where Registry.RegKey Like '%Supremo%' And Registry.ValueName Like '%ClientID%'

 

 

 

I think, but I'm not sure, I could do the update of the "TblAssetCustom.custom1" in my query...

Thank you.

1 REPLY 1
FrankSc
Lansweeper Tech Support
Lansweeper Tech Support

Hello luigirusso,
If you create a new report, the default query that is shown gives you the correct join to tblassetcustom. 
You can use the same join and then select Custom1 in the field list as shown in the screenshot.

 

New to Lansweeper?

Try Lansweeper For Free

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

Try Now