DSM Reporter: How to add the "Description" and "Agent Version" as available fields for reporting

Document ID : KB000004294
Last Modified Date : 18/05/2018
Show Technical Document Details
Issue:

We wish to include the details in the "Description" and "Agent Version" fields found in DSM Explorer, as reportable fields in DSM Reporter:

User-added image

User-added image

Environment:
Client Automation (ITCM) -- any version
Cause:

This field is not currently exposed to DSM reporter.

Resolution:

Execute the following query in SQL Server Management Studio to add these fields:

-- Agent description
INSERT INTO rpdatfld
VALUES
('ITRM_DISCOVEREDHARDWARE11',
'ENU','Description','ca_agent',
'description','Description',
1,1,15,7,0,
'Crit0PseudoTemplate=Description = ''$CritValueLabel$'';'+CHAR(13)+CHAR(10)+
'DisplayEnum=;'+CHAR(13)+CHAR(10)+
'Crit0Type=CT_STRING;'+CHAR(13)+CHAR(10)+
'Usage=0;'+CHAR(13)+CHAR(10)+
'CriteriaCount=1;'+CHAR(13)+CHAR(10)+
'PseudoTemplate=($Crit0Pseudo$);'+CHAR(13)+CHAR(10)+
'Crit0Name=Description;'+CHAR(13)+CHAR(10)+
'Crit0ValueSelector=VS_EDITABLELIST;'+CHAR(13)+CHAR(10)+
'Category=General Information>Computer;'+CHAR(13)+CHAR(10)+
'Table=ca_agent;'+CHAR(13)+CHAR(10)+
'Column=description;'+CHAR(13)+CHAR(10)+
'Crit0PossibleValues=SELECT DISTINCT description as label, description as value FROM ca_agent ORDER by label;'+CHAR(13)+CHAR(10)+
'Description=Description;'+CHAR(13)+CHAR(10)+
'Name=Description;'+CHAR(13)+CHAR(10)+
'From=ca_agent;'+CHAR(13)+CHAR(10)+
'SqlTemplate=$target.primarykeyfield$ in ($Crit0Sql$);'+CHAR(13)+CHAR(10)+
'Crit0SqlTemplate=SELECT object_uuid FROM ca_agent WHERE Description $CritOperator$ ''$CritValue$'';'+CHAR(13)+CHAR(10)+
'Where=object_uuid=PRIMOBJECT;'+CHAR(13)+CHAR(10)+
'ProcessSiblings=0;'+CHAR(13)+CHAR(10))

-- Agent version
INSERT INTO rpdatfld
VALUES
('ITRM_DISCOVEREDHARDWARE11',
'ENU','Agent Version','ca_agent',
'agent_version','Agent Version',
1,1,15,7,0,
'Crit0PseudoTemplate=Description = ''$CritValueLabel$'';'+CHAR(13)+CHAR(10)+
'DisplayEnum=;'+CHAR(13)+CHAR(10)+
'Crit0Type=CT_STRING;'+CHAR(13)+CHAR(10)+
'Usage=0;'+CHAR(13)+CHAR(10)+
'CriteriaCount=1;'+CHAR(13)+CHAR(10)+
'PseudoTemplate=($Crit0Pseudo$);'+CHAR(13)+CHAR(10)+
'Crit0Name=Description;'+CHAR(13)+CHAR(10)+
'Crit0ValueSelector=VS_EDITABLELIST;'+CHAR(13)+CHAR(10)+
'Category=General Information>Computer;'+CHAR(13)+CHAR(10)+
'Table=ca_agent;'+CHAR(13)+CHAR(10)+
'Column=agent_version;'+CHAR(13)+CHAR(10)+
'Crit0PossibleValues=SELECT DISTINCT agent_version as label, agent_version as value FROM ca_agent ORDER by label;'+CHAR(13)+CHAR(10)+
'Description=Agent Version;'+CHAR(13)+CHAR(10)+
'Name=Agent Version;'+CHAR(13)+CHAR(10)+
'From=ca_agent;'+CHAR(13)+CHAR(10)+
'SqlTemplate=$target.primarykeyfield$ in ($Crit0Sql$);'+CHAR(13)+CHAR(10)+
'Crit0SqlTemplate=SELECT object_uuid FROM ca_agent WHERE Description $CritOperator$ ''$CritValue$'';'+CHAR(13)+CHAR(10)+
'Where=object_uuid=PRIMOBJECT;'+CHAR(13)+CHAR(10)+
'ProcessSiblings=0;'+CHAR(13)+CHAR(10))


Both these fields will now be available in DSM Reporter:

User-added image

User-added image

Additional Information:

As this is a customization it is possible that it may be reverted by future product upgrades and this has not undergone any QA testing.