CMDB Integration Studio Application Data Source showing Issue?

siva44
Tera Contributor

I have trying to load the Computers Data into CMDB computer table using Intune Graph Connector and my requirement is Skipping the records specific field value from staging table records so I wrote the CMDB Integration Studio Application Data Source before execute script but not working it is showing error like "Before script unable to process records with error message: The undefined value has no properties." i have put the correct backend field value from staging table
Before execute script:

 (function(input, runId) {
 
     // Add your code here
     for (var i = 0; i < input.length; i++) {
       if (!isComputerNameValid(input[i].payload)) {
              input[i].status = 'SKIPPED';
          input[i].reason = 'Skipping IRE processing of this payload: Manufacture is Amaz test';
        }
        }
 
 })(input, runId);
  function isComputerNameValid(payload) {
     for (var i = 0; i < payload.items.length; i++)
         if (payload.items[i].values.u_manufacturer.startsWith('Amaz test'))
              return false;
     return true;
   }
5 REPLIES 5

Kieran Anson
Kilo Patron

Hi,

The before script only has access to values mapped as part of the class mapping, there is no access to values from the import set table. 

Hi @Kieran Anson  is there another way for restrict records?

 

I'm not sure what you mean by restrict records? Perhaps you're referring to a different question?

I have trying to load the Computers Data into CMDB computer table using Intune Graph Connector and my requirement is Skipping the records specific field value from staging table records like manufacturer is "amazom" need to be skipping