Problems with Eval Javascript in Transform Table Pattern Operation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2018 11:11 AM
I am writing up a horizontal discovery pattern that is bringing back Display (monitor) information. When I am performing the Transform Table operation, I have one field that takes the Manufacture and should return the Manufacture SysID from the core_company table. The code below is not returning a proper SysID when I have it in the field as Eval Javascript:
var newVendor = ${displaysMonitor1[].monitorVendor1};
var mm = Packages.com.snc.cmdb.MakeAndModel.fromNames(newVendor , null);
var mfgSysID = mm.getManufacturerSysID();
ms.log("Debug ::" + newVendor+ "::" + mfgSysID);
rtrn = mfgSysID;
The vendors being returned are in the core_company table. I am getting no errors from the script. mm and mfgSysID are coming back undefined.
What else can I try?
Thanks,
Tom
- Labels:
-
Discovery
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2018 03:50 AM
Chris,
Thank you for the reply.
I would normally use SncMakeAndModel instead of Packages.com.snc.cmdb.MakeAndModel; however, that produced errors.
Tom