The Zurich release has arrived! Interested in new features and functionalities? Click here for more

We need to stop updating the computer records when the state is in retired state

suuriyas
Tera Contributor

HI Community,

 

I have a requirement, "Stop updating any attributes for the computers in disabled state to in retired OU"

We need to stop updating the computer records when the state is in retired state... we are using a robust transform map and the data is coming from AD so when the computers are in retired state then that particular records should not update / map.

 

Please let me know how we can write a condition for this.

6 REPLIES 6

@suuriyas 

you can use onBefore transform script and check the target CI is retired or not.

If yes then ignore the row

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {

    // Add your code here
    if (target.operational_status.toString() == '6') {
        ignore = true;
    }

})(source, map, log, target);

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@suuriyas

Hope you are doing good.

Did my reply answer your question?

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader