cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
koglerh
Engaged Sweeper III
Hello there!

I am trying to create a new dynamic asset group, where i want to have an 'AND' condition in the query. So for example Software 1 installed AND Software 2 installed. Is this possible? When i do it now, i get the assets that meet at least 1 of the conditions, not both combined...

Thanks in advance
1 ACCEPTED SOLUTION
Daniel_B
Lansweeper Alumni
Adding several software installations to dynamic groups will use an OR filter. We recommend that you create a report in order to define specific criteria. Select Reports\Create new report and replace the SQL code of the report with the following one in order to list computers which have two software products installed:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssets.AssetID In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftware.softID =
tblSoftwareUni.SoftID
Where tblSoftwareUni.softwareName Like '%Software A%') And
tblAssets.AssetID In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftware.softID =
tblSoftwareUni.SoftID
Where tblSoftwareUni.softwareName Like '%Software B%') And
tblAssetCustom.State = 1

View solution in original post

3 REPLIES 3
Susan_A
Lansweeper Alumni
We are unlikely to extend the functionality of dynamic groups to be honest. We'd end up making the dynamic group feature as intricate as the report builder, when it is meant as a simplified or "stripped down" version of the builder. If your group requirements are too complicated, it is recommended that you build a custom report under Reports\Create New Report instead.
koglerh
Engaged Sweeper III
OK thx. Are there any plannings to integrate 'AND' and 'OR' selectors in the asset groups? Handling with dynamic asset groups is way easier for non-Lansweeper stuff...
Daniel_B
Lansweeper Alumni
Adding several software installations to dynamic groups will use an OR filter. We recommend that you create a report in order to define specific criteria. Select Reports\Create new report and replace the SQL code of the report with the following one in order to list computers which have two software products installed:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypename,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tblAssets.Lastseen,
tblAssets.Lasttried
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Where tblAssets.AssetID In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftware.softID =
tblSoftwareUni.SoftID
Where tblSoftwareUni.softwareName Like '%Software A%') And
tblAssets.AssetID In (Select tblSoftware.AssetID
From tblSoftware Inner Join tblSoftwareUni On tblSoftware.softID =
tblSoftwareUni.SoftID
Where tblSoftwareUni.softwareName Like '%Software B%') And
tblAssetCustom.State = 1

New to Lansweeper?

Try Lansweeper For Free

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

Try Now