The CreatorCon Call for Content is officially open! Get started here.

How to clone only the closed records?

Suggy
Giga Sage

As part of cloning, I want to include only the inactive records to be cloned from source instance to target instance.

ex - only closed incident, problem, change records should be cloned. And records which are open/active should not cloned.

 

Is that possible?

1 ACCEPTED SOLUTION

Chaitanya ILCR
Mega Patron

Hi @Suggy

clone those entire tables and run a clone clean up script and delete the active ones

or exclude those tables and move the closed ones through IDR.

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

View solution in original post

10 REPLIES 10

@Shivalika I dont want the active records to be cloned to the target instance. THis is my requirement.

Hello @Suggy 

 

You don't want it to be cloned. So in a nutshell, your requirement is to clone only closed records and keep the active records as it is, no addition as well. 

 

Then add preserver and excluder both on the active records. In that case the currently active records in the instance will be preserved and nothing active will be added as well. Keep it as it is. 

 

And since you didn't write any condition either in preserver or excluder for closed records, they will be cloned. 

 

Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket. 

 

Regards,

 

Shivalika 

 

My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194

 

My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY

 

If I am understanding correct, you need to

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Suggy 

 

Yes, you can. You can check @Shivalika  answer and more in depth

https://www.servicenow.com/community/developer-forum/cloning-exclude-table-vs-preserve-data/m-p/1431...

*************************************************************************************************************
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]

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

Chaitanya ILCR
Mega Patron

Hi @Suggy

clone those entire tables and run a clone clean up script and delete the active ones

or exclude those tables and move the closed ones through IDR.

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

GV Saranesh Kum
Kilo Guru

Hi @Suggy 

I go with @Chaitanya ILCR response.

Do not Preserve the data nor Exclude the table. As part of the clone, let all the data from source come to target. Write a clean up script to delete all active tickets.

 

Regards

Saranesh