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

Summary

This article will describe a potential inconsistency may be seen when customer is viewing the inventory on field "Last Inventory Date" between the grid row value compared with the opening property dialog value where the Last Inventory Date view will be empty.

Synopsis

This article will describe a potential inconsistency may be seen when customer is viewing the inventory on field "Last Inventory Date" between the grid row value compared with the opening property dialog value where the Last Inventory Date view will be empty.

The cause is due to the 'InventoryDate' field is NULL.

The property dialog page will show 'empty when this field value is NULL, but 'All Inventory' page, the row grid view will using another SQL View '' ComputerBasicDisplayInfo" -- the details of this view statement can be found in the 'Additional Information' session.

So when InventoryDate is Null, the view use '
ISNULL(cci.InventoryDate, GETDATE()) AS InventoryDate, '

Therefore such missing 'Inventory Date' device, they will also showing a current SQL Server date as 'Inventory Date' from grid view.



Discussion

Such missing 'Inventory Date' device will confuse end user by comparing the inventory date (customer report etc).

However the fundermental issue we need determine is why the Inventory is created but missing Inventory date. So the current design of the view used by grid should only affect a very small portion of 'problematic Device', if the number is large we need check further on the source import process to find out why Inventory Date is Null.

Workaround

Make sure those device has inventory tool running to get the inventory information and returned to FlexNet Manager Platform, so eventually inventorydate field from ComplianceComputer table will be reset from Null.

Additional Information


CREATE VIEW dbo.ComputerBasicDisplayInfo AS
SELECT
cci.ComplianceComputerID,
cci.ComputerName,
cci.DomainName,
cci.HostComputerName,
cci.HostComplianceComputerID AS HostId,
hst.AssetID AS HostAssetId,
cci.AssetID,
cci.OperatingSystem,
cci.ServicePack,
cci.NumberOfProcessors,
cci.ProcessorType,
cci.MaxClockSpeed,
ROUND(CAST(cci.TotalMemory AS FLOAT)/(1073741824),2) AS RAM, -- convert into GB
ChassisType,
cci.NumberOfHardDrives,
ROUND(CAST(cci.TotalDiskSpace AS FLOAT )/(1073741824),2) AS TotalDiskSpace, -- convert into GB
cci.NumberOfNetworkCards,
cci.NumberOfDisplayAdapters,
cci.IPAddress,
cci.MACAddress,
cci.Manufacturer,
cci.ModelNo,
cci.SerialNo,
cat.[Path] AS Category,
ISNULL(cci.InventoryDate, GETDATE()) AS InventoryDate,
cci.InventoryAgent,
ISNULL(au.UserName, au.SAMAccountName) AS AssignedUser,
ISNULL(cu.UserName, cu.SAMAccountName) AS CalculatedUser,
cci.CreationDate,
acs.StatusDefaultValue AS ComplianceStatus,
cci.ComplianceComputerInventorySourceTypeID,
cci.VirtualMachineID,
ComputerType,
ComputerInventorySource,
cci.ComplianceComputerTypeID,
VMType,
cci.VMName,
cci.NumberOfCores,
cci.NumberOfSockets,
cci.PartialNumberOfProcessors,
cci.NumberOfLogicalProcessors,
cci.HostIdentifyingNumber,
vm.ServiceProvider,
vm.VMPoolID AS Pool,
cci.ComplianceComputerStatusID AS StatusID,
ccsi.DefaultValue AS Status,
cci.LocationID,
loc.[Path] AS Location,
cci.BusinessUnitID AS CorporateUnitID,
dep.[Path] AS CorporateUnit,
cci.CostCenterID,
cctr.[Path] AS CostCenter,
ccri.DefaultValue AS [Role],
ISNULL(llu.UserName, llu.SAMAccountName) AS LastLoggedOnUser,
cci.CalculatedUserID,
cci.AssignedUserID,
ast.ShortDescription AS AssetName,
rec_ast.ShortDescription AS RecommendedAssetLink,
rec_ast.AssetID AS RecommendedAssetID,
ccci.ConnectionName AS InventoryConnectionName,
CASE
WHEN ISNULL(cci.AssetID,'') != '' THEN
(
SELECT (
SELECT cci.AssetID AS ID,
ast.ShortDescription AS [Value]
FOR XML PATH('Item'),
TYPE
)
FOR XML PATH(''),
ROOT('Items')
)
END AS LinkedAssetDetails,
CASE
WHEN ( cci.ComplianceComputerTypeID = 3 AND cts.SettingValue = 1 )
OR (ISNULL(rec_ast.AssetID,'') = '') THEN
NULL
ELSE
(
SELECT (
SELECT rec_ast.AssetID AS ID,
rec_ast.ShortDescription AS [Value]
FOR XML PATH('Item'),
TYPE
)
FOR XML PATH(''),
ROOT('Items')
)
END AS RecommendedAssetDetails,
ni.NotificationCount,
ni.Notification,
ast.AssetStatusID,
asts.StatusDefaultValue AS AssetStatus,
CASE WHEN cts.SettingValue=1 AND (cci.AssetID) IS NULL AND hst.AssetID IS NOT NULL AND cci.ComplianceComputerTypeID = 3 THEN
1 ELSE
0 END AS IsVirtualMachineLinkedViaHost, -- The virtual machine is linked to an asset because the host is.
DATEDIFF(DAY,ISNULL(cci.InventoryDate, GETDATE()),GETDATE()) as MissingComputersThreshold,
cts.SettingValue AS VMsFollowHostToRegistered, -- The virtual machines status will be Registered if the host is linked to an asset, and this value is 1
CASE
WHEN cci.NumberOfCoresDefault IS NOT NULL OR
cci.NumberOfSocketsDefault IS NOT NULL OR
cci.NumberOfProcessorsDefault IS NOT NULL OR
cci.PartialNumberOfProcessorsDefault IS NOT NULL OR
cci.MaxClockSpeedDefault IS NOT NULL OR
cci.NumberOfLogicalProcessorsDefault IS NOT NULL OR
cci.ModelNoDefault IS NOT NULL OR
cci.ProcessorTypeDefault IS NOT NULL
THEN 1
ELSE 0
END AS Overridden,
vm.AffinityEnabled,
vm.VMEnabledStateID,
vm.FriendlyName ,
vm.CPUAffinity,
vm.CoreAffinity
FROM dbo.ComplianceComputerInfo cci
LEFT OUTER JOIN ComplianceComputerStatusI18N ccsi
ON ccsi.ComplianceComputerStatusID = cci.ComplianceComputerStatusID
LEFT OUTER JOIN dbo.GroupEx_T loc
ON loc.GroupExID = cci.LocationID
LEFT OUTER JOIN dbo.GroupEx_T cctr
ON cctr.GroupExID = cci.CostCenterID
LEFT OUTER JOIN dbo.GroupEx_T dep
ON dep.GroupExID = cci.BusinessUnitID
LEFT OUTER JOIN dbo.Category AS cat ON cat.GroupExID = cci.CategoryID
LEFT OUTER JOIN dbo.VirtualMachine vm
ON vm.ComplianceComputerID = cci.ComplianceComputerID
LEFT OUTER JOIN dbo.ComplianceUser cu
ON cu.ComplianceUserID = cci.CalculatedUserID
LEFT OUTER JOIN dbo.ComplianceUser au
ON au.ComplianceUserID = cci.AssignedUserID
LEFT OUTER JOIN dbo.AssetComplianceStatusI18N acs
ON acs.AssetComplianceStatusID = ISNULL(cci.AssetComplianceStatusID, 1) -- New by default
LEFT OUTER JOIN dbo.ComplianceComputerRoleI18N ccri
ON ccri.ComplianceComputerRoleID = cci.ComplianceComputerRoleID
LEFT OUTER JOIN dbo.ComplianceUser llu
ON llu.ComplianceUserID = cci.ComplianceUserID
LEFT OUTER JOIN dbo.Asset ast
ON ast.AssetID = cci.AssetID
LEFT OUTER JOIN AssetStatusI18N asts
ON asts.AssetStatusID = ast.AssetStatusID
LEFT OUTER JOIN dbo.ComplianceTenantSetting AS cts ON cts.SettingNameID = 40 -- VMsFollowHostToRegistered setting
LEFT OUTER JOIN dbo.SerialNumberBlackList snbl
ON snbl.SerialNo = cci.SerialNo
OUTER APPLY (
SELECT a.*
FROM (
SELECT CASE WHEN
cci.SerialNo IS NULL
OR cci.SerialNo = ''
OR snbl.SerialNumberBlackListID IS NOT NULL
OR cci.AssetID IS NOT NULL
OR (cts.SettingValue = 1 AND cci.ComplianceComputerTypeID = 3)
THEN NULL
ELSE (
SELECT AssetID
FROM dbo.Asset_LinkedToDummy() ald
WHERE ald.SerialNumber = cci.SerialNo
)
END AS AssetID
) ald
JOIN dbo.Asset a
ON a.AssetID = ald.AssetID
) rec_ast
LEFT OUTER JOIN dbo.ComplianceComputerConnectionInfo ccci
ON ccci.ComplianceComputerID = cci.ComplianceComputerID
LEFT OUTER JOIN NotificationInfo AS ni ON ni.TargetID = cci.ComplianceComputerID AND ni.TargetTypeID = 14 -- Compliance computer
-- Self join to retrive Host computer AssetId
LEFT OUTER JOIN ComplianceComputer AS hst ON hst.ComplianceComputerID = cci.HostComplianceComputerID
-- Exclude computers with awaiting inventory status, not using "ComplianceComputerNotDummy" view for performance reason
WHERE cci.ComplianceComputerStatusID != 4
AND cci.ComplianceComputerTypeID != 6 -- VDI Templates
Was this article helpful? Yes No
0% helpful (0/1)
Comments
anne_watson
By
Level 6

This does not explain the cause of inventory coming in with a null date.  Please expand on the larger issue.

Version history
Last update:
‎Dec 11, 2018 10:45 PM
Updated by: