Summary
This article describes how to filter the list of available devices which are displayed when checking out using 'Request On Behalf Of'. In particular, the provided query will only list active devices.
Synopsis
This article provides information on creating a custom view which can be used to filter out the list of target devices when checking out using 'Request On Behalf Of'
Discussion
By default, App Portal will allow the requester to select any device returned by the following query (run against the App Portal database):
select * from vUserComputerMap
If it is desirable to filter out the list of devices which will be available, then a custom view can be created which will filter out the device list. The following query can be used to create a view which will filter out any devices which are not active:
CREATE VIEW [dbo].[CustomROBView] AS SELECT Distinct vru.CM12ID as UserResourceID, vru.FullName, vru.email,
vru.UserName, vru.office, vru.Department,vru.UniqueName, vrs.ComputerID as ResourceID, vrs.MachineName, vrs.Client, vrs.Active, vrs.MachineDomain FROM vComputer AS vrs
INNER JOIN dbo.WD_UserComputerMap AS ucm ON ucm.ComputerID_= vrs.ComputerID
LEFT OUTER JOIN vUser AS vru ON ucm.UserID_ = vru.UserID
where vrs.active = 1
GO
This will create a view named CustomROBView which will return all active computers. Once the view has been created, it is necessary to "register" the new view with App Portal. To do this, open the App Portal site, and go to settings->web site->general. For the "Request On Behalf DB View", specify the name of the view which was created. In this case, "CustomROBView".. Once this view has been specified, then only the devices returned by running the view query should be available.
Additional Information
For Additional information, see
Enabling a Catalog Item to Be Requested on Behalf of Another User/Device