Update bulk CI through background script

vinod6
Tera Contributor

I want to update 4000 records in the cmdb_ci table based on the Name and Class fields to update the Scope. I prefer to do this only through a background script, not a fix script. Please provide a background script for this—it will be helpful for me.
Thanks in advance.

6 REPLIES 6

Rafael Batistot
Kilo Patron

Hi @vinod6 

May you try to update via Excel template, it's more safe once that you have huge volume 

Import the Excel template


Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @vinod6 

 

A count of 4000 is quite large. Why not use the Import Update method? It’s easier and doesn’t require any code.

Steps:

  1. Go to the cmdb_ci table.

  2. Select the CI records you want to update.

  3. Right-click on any field and choose Import.

  4. Download the Excel file for update.

  5. Make the required changes in Excel.

  6. Upload the updated Excel back into the system.

 

DrAtulGLNG_0-1755766340435.png

DrAtulGLNG_1-1755766377842.png

 

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Nikhil Bajaj9
Tera Sage

Hi @vinod6 ,

 

MY POV- you should use Import set/ Transform map to update the records as it is quite safe and easy.

 

If my answer helped you, please mark it- solution accepted. 

 

Regards,

Nikhil Bajaj

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj

Pratiksha
Mega Sage
Mega Sage

What you are trying to update?