Asset imports and CI updates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 07:47 PM
I've built a basic transform map to import assets into the hardware assets and it works ok. This also creates a CI for the asset (fantastic) but i'd like to autofill some of the CI data from the excel file data import. I tried mapping to Computer CI in the map but that's not working as i don't believe you can make to multiple destination tables in 1 transform map. I created a 2nd map for CI and ran it but it just inserts a new CI record not linked to the Asset (so i end up with duplicates).
What is the best method to use a csv data load for assets but then populate more data for the corresponding CI created with the asset?
- Labels:
-
Enterprise Asset Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 08:48 PM
Hi Eric,
The easiest way to accomplish this is to use 2 transform maps; One for the hardware asset and one for the corresponding computer CI. The key to making this work is to coalesce each transform map on a common field. I would recommend using either "Asset tag" or "Serial number" as they are available on both tables and synchronized between the two records out of box. Please note; The solution is only applicable if the field you choose to coalesce on has unique values.
Here's a basic example of two transform maps you would want to run in order:
- Create hardware asset
- Update computer CI
You can go a step further to enforce the actions of each transform map with an onBefore script. Here's an example of an onBefore script (Geneva or later) that you could use with the "Update computer CI" transform map to ensure it will only update existing data.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Ignore all non-update actions
if (action != 'update') {
ignore = true;
}
})(source, map, log, target);
One other important note; If you are setting this up for a scheduled import, ensure you set the correct order for each transform map otherwise it may run the "Update computer CI" first.
There are definitely other ways to accomplish this with a single transform map, but I'd suggest this approach as it will leverage the platform import/transform process without a lot of custom code to maintain.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2016 12:03 PM
Aric-
Thanks for the tip. I've tried the 2 transforms using a coalesce field (serial number). I'm testing with a CSV of 10 assets and end up with 10 assets in the Asset list and 20 items in the CI list. The first map works to create the 10 items in Asset and CI but the 2nd map doesn't update the existing 10, rather inserts 10 new CI objects. It isn't a timing issue as i did them separately also so i'm at a loss as to how to make the 2nd map do an update and not an insert.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2016 06:10 AM
Eric: Can you attach a screen shot of your pre-script and mapping of the second transform map?
I would expect in the pre-script something like this:
if(action == 'insert'){
ignore = true;
}
This will for sure keep the CI from inserting on the second record - however, the coalesce issue is interesting as well.
-Akash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2016 02:56 PM