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

You could skip those within the CI class mapping by using a conditional class and filtering based on your manufacturer field. No scripting needed