- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2022 10:49 PM
Hi All,
I am populating CI using import set table I want to check if record is already present and update the record I enabled 'coalesce' it was good but I need to achieve this functionality using IRE so I used below script
Still it is creating duplicate record in target table , can someone please help if I am missing something.
Solved! Go to Solution.
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2022 06:25 AM
As others have noted, you're most likely missing an identification rule or mapping the wrong data into a field (so as not to cause a match). You can enable debugVerbose logging and check out what's going on in the process to confirm.
Properties for Identification and Reconciliation (servicenow.com)
In your script, it would also be a good idea to set a Discovery Source to make things easier to understand in the logs:
cmdbUtilIRE.setDiscoverySource([source name]);
If you haven't already, you'll need to register the Discovery Source first, though. You can do that in a fix script:
var sourceName = “[source name]”,
dsUtil = new global.CMDBDataSourceUtil();
dsUtil.addDataSource(sourceName);
Looking at your initial post, it should be a given, but we ought to confirm...your Import Set's target table is in the CMDB, correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2022 05:13 AM
Hello Gaurav,
Could you please share the code how does it look after you have added the discovery source?
Just want to see in what order you are doing this.
Thanks,
Sunny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2022 08:12 AM
var UtilIRE = new global.CMDBTransformUtil();
UtilIRE .setDataSource('ImportSet');
UtilIRE .identifyAndReconcileEnhanced(source, map, log);
ignore = true;
if (UtilIRE .hasError()) {
var errorMessage = UtilIRE .getError();
log.error(errorMessage);
} else {
log.info('Out Payload: ' + UtilIRE.getOutputPayload());
log.info('In CI: ' + UtilIRE.getOutputRecordSysId());
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2022 11:19 PM
Hi Gaurav,
Good Morning,
can you share complete code which you write ?
Regards
Anil Sharma