How to inactive reports that are not run in the last 6 months?

Manasa Reddy Li
Tera Contributor

Hi community,

 

How to inactive reports that are not run in the last 6 months ? and after inactivating, we want to delete the reports after one month of inactivation.

 

Thanks

1 ACCEPTED SOLUTION

@Manasa Reddy Li 

something like this

report delete after 1 month.gif

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

View solution in original post

9 REPLIES 9

@Manasa Reddy Li

have a flow trigger on sys_report with Condition Active Changes to False

Then use Wait for Duration 1 month (30 days * 24 hours)

Then use Delete Record flow action

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

@Manasa Reddy Li 

something like this

report delete after 1 month.gif

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

@Manasa Reddy Li 

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

Swapna Abburi
Mega Sage
Mega Sage

Hi @Manasa Reddy Li 

You can use "report_stats" table to identify when the report was last run using 'last_run' field.

 

You can run a flow with scheduled trigger or a scheduled job. Flow would be simple without the need to write script.

AndersBGS
Tera Patron
Tera Patron

Hi @Manasa Reddy Li ,

 

You can create a scheduled job to cleanup reports that hasn't been utilized for 6 months. query the report_stats table and remove reports that hasn't been utilized in the expected time frame.

 

If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.

Best regards
Anders

Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/