How custom data class updates its entries for the same computer
search cancel

How custom data class updates its entries for the same computer

book

Article ID: 252477

calendar_today

Updated On:

Products

IT Management Suite

Issue/Introduction

This is the scenario:

I have been asked to create a Custom inventory to look for software license keys.
I have created a Custom Data Class with 4 attributes, Multirow option checked.
I have created PowerShell scripts that parses the data we want.

The question is:
Is it possible to have multiple Tasks that use the same Custom Data Class GUID and NOT have the data overwritten when two tasks run on the same computer.

Environment

ITMS 8.5, 8.6

Resolution

The current product design will cause the data for the custom data class to be overwritten for that computer. 
When we get new data from a computer, it will put in the most current data and delete the old entry just like it would for other data classes.

An NSE created for Custom Inventory does not update the data class incrementally (NSE always has attribute partialUpdate="false" for custom data class). They always do a full update.
For example if:
1st task populated data class for some computer with row1 = AAA, row2=BBB
2nd task populated the same data class for the same computer with row1 = XXX
only row1 = XXX will be stored in DB after execution of 1st and 2nd tasks
 
A multirow flag means that each computer may populate several rows for this data class.


Usually, the approach that others have taken are:

1. Use different custom data classes, so each contains a specific set of results from each location that the script is trying to obtain information.

OR

2. Make your scripts robust enough to run simultaneously so that when the event (NSE) for that custom data class is sent, it will contain the results from those scripts simultaneously without one overwriting the other because those were received at different times

Additional Information

"How to create custom data classes" ( KB 181379 )
"How to create a custom report that uses a custom resource and custom data classes" ( KB 181382 )