Dell Kace K1000 v6.4 - Assets - Asset Types - Device - Create Asset Field to return Custom Inventory Fields.
Does anyone knows how do I track Custom Inventory informations on an Asset Field?
For example, I have a Custom Inventory Rule that gives me Hard Drive informations and I would like to create an Asset Field to get this information.
For example, I have a Custom Inventory Rule that gives me Hard Drive informations and I would like to create an Asset Field to get this information.
3 Comments
[ + ] Show comments
Answers (1)
Please log in to answer
Posted by:
Hobbsy
8 years ago
So as a combination of the comments above, if you have a custom inventory field that populates the data you require into the inventory tables.
Create the asset field within the Asset type, I am assuming it is a Device Asset
Next take note of the Asset field name (shown below in Yellow) and the custom inventory name (shown below in Orange)
Then use the code provided above by bstutz to copy the data across, within a scheduled ticket rule if you want it to be regularly updated or just run it once to populate the asset table once.
Select
ASSET_DATA_5.FIELD_10121,
MACHINE.BIOS_SERIAL_NUMBER
From
ASSET Inner Join
MACHINE On MACHINE.ID = ASSET.MAPPED_ID Inner Join
ASSET_DATA_5 On ASSET.ASSET_DATA_ID = ASSET_DATA_5.ID
UPDATE
ASSET_DATA_5.FIELD_10121,
MACHINE.BIOS_SERIAL_NUMBER
SET
ASSET_DATA_5.FIELD_10121 = MACHINE.BIOS_SERIAL_NUMBER
ASSET_DATA_5.FIELD_10121,
MACHINE.BIOS_SERIAL_NUMBER
From
ASSET Inner Join
MACHINE On MACHINE.ID = ASSET.MAPPED_ID Inner Join
ASSET_DATA_5 On ASSET.ASSET_DATA_ID = ASSET_DATA_5.ID
UPDATE
ASSET_DATA_5.FIELD_10121,
MACHINE.BIOS_SERIAL_NUMBER
SET
ASSET_DATA_5.FIELD_10121 = MACHINE.BIOS_SERIAL_NUMBER
Select
ASSET_DATA_5.FIELD_10121,
MACHINE.BIOS_SERIAL_NUMBER
From
ASSET Inner Join
MACHINE On MACHINE.ID = ASSET.MAPPED_ID Inner Join
ASSET_DATA_5 On ASSET.ASSET_DATA_ID = ASSET_DATA_5.ID
UPDATE
ASSET_DATA_5.FIELD_10121,
MACHINE.BIOS_SERIAL_NUMBER
SET
ASSET_DATA_5.FIELD_10121 = MACHINE.BIOS_SERIAL_NUMBER
*NOTE*
Note that you will need to identify the DB value for the fields you create in your Asset, so that the SQL can be updated with the data. - bstutz 8 years ago