 FROM dbo.Users AS U3) as U
 WHERE TextSearch<>'' '' OR ISNULL(TextSearch, 0) > 0
 )
- AS U ON TU.UserID = U.ItemID
- ORDER BY TextSearch'
+ AS U ON TU.UserID = U.ItemID'
+IF @FilterValue <> ''
+	SET @sqlUsers = @sqlUsers + ' WHERE TextSearch LIKE ''' + @FilterValue + ''''
+SET @sqlUsers = @sqlUsers + ' ORDER BY TextSearch'
 
 SET @sqlUsers = @sqlUsers + ' open @curValue'
 

	FROM @ItemsService AS I
	INNER JOIN ServiceItems AS SI ON I.ItemID = SI.ItemID
	INNER JOIN ServiceItemTypes AS STYPE ON SI.ItemTypeID = STYPE.ItemTypeID
	WHERE STYPE.Searchable = 1
	UNION (
	SELECT		
		D.DomainID AS ItemID,
		D.DomainName as TextSearch,
		''Domain'' as ColumnType,

	UserID int
)
INSERT INTO @Users (UserID)
SELECT 
	U.UserID
FROM UsersDetailed AS U
WHERE 
	U.UserID <> @UserID AND U.IsPeer = 0 AND
