Problems with Eval Javascript in Transform Table Pattern Operation

tphillips
Tera Contributor

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

10 REPLIES 10

Chris,

Thank you for the reply.  

I would normally use SncMakeAndModel instead of Packages.com.snc.cmdb.MakeAndModel; however, that produced errors.

Tom