How to pass discovery schedule fields to a CI record via discovery for a reference field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2023 09:48 AM
Hi Team ,
I have a reference field in CIs called "business_unit" and i have created a new reference field on Discovery schedule for called "u_b_unit". The requirement is to pass this schedule field value to CI record via discovery . I have referred the below kb articles but not sure of step by step process of it. Could you please provide the steps how can we achieve this .
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0820001
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0864114
Thank you 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2023 08:39 PM
Hi @Uttam Sai
You need to refer the "Discovery Device Complete" script action from the navigation menu as mentioned in the KB. In that script you have the cmdb_ci info already and can query the schedule table as given in KB example and update that in the cmdb CI in the same script action.
Probably you can have a new script action instead updating OOB and above said is for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2023 07:52 AM
Hi @SiD2 ,
I have tried to create a script action as below but it didn't work (It is not updating the CI).
Would you please suggest on this.
var cmdb_ci = current.cmdb_ci + '';
if (cmdb_ci) {
var ipf = new IPAddressFixup(cmdb_ci);
ipf.fix();
}
(function() {
var b_unit = current.status.dscheduler.u_b_unit;
gs.log(b_unit, "business_unit");
}());
gs.eventQueue("discovery.device.post.complete", current, current.sys_id, current.status);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-02-2023 09:55 PM - edited ‎02-05-2023 08:02 PM
To pass discovery schedule fields to a CI record via discovery, follow these steps:
Create a reference field on the CI record to store the discovery schedule information.
In the discovery schedule, select the reference field as a target field.
Map the discovery schedule fields to the reference field in the data mapping section.
Run the discovery schedule and verify that the data is being passed to the CI record.
In conclusion, by mapping the discovery schedule fields to the reference field on the CI record, you can pass the discovery schedule information to the CI record for reference purposes. official website
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2023 01:11 AM - edited ‎02-06-2023 08:19 PM
To pass discovery schedule fields to a CI record via discovery for a reference field in ServiceNow, create a custom reference field on the CI, create a transform map to map the discovery schedule fields, add the transform map to the discovery schedule's input/output mapping, and run the discovery schedule to populate the custom reference field. Familiarity with ServiceNow configuration and scripting is recommended.
Dashboard Anywhere Login