cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Jono
Champion Sweeper II
Hello -

Is there a way to set one of the custom fields to the same value for multiple computers? We have 3 offices and I'd like to be able to search and filter based on office. The Custom Fields includes a "Branch office" field. I'd like to use that field, but I don't want to have to go into every single computer record to set it.

Is there a way to select some computers and edit that field on the resultant list all at once?

Thanks,
Jono
2 REPLIES 2
Jono
Champion Sweeper II
Thanks LS
Hemoco
Lansweeper Alumni
Something like this will have to be done through a script. You must find a common parameter for the computers you wish to update that is not shared by other computers.

An example script can be seen below. This script can be executed in the Lansweeper configuration console under Lansweeper\Database Scripts. It sets the "Branchoffice" value for computers starting with "LAN" to "Office 1".

INSERT INTO tblCompCustom (Computername)
SELECT Computername
FROM tblComputers
WHERE (Computername NOT IN (SELECT Computername FROM tblCompCustom AS tblCompCustom_1))
GO
UPDATE tblCompCustom
SET Branchoffice = 'Office 1'
FROM tblCompCustom INNER JOIN
tblComputers ON tblCompCustom.Computername = tblComputers.Computername
WHERE (tblComputers.Computer LIKE 'LAN%')


Please note as well that you should practice caution when making database changes. Always back up your database before applying any changes.

New to Lansweeper?

Try Lansweeper For Free

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

Try Now