Unable to delete folder with no views or reports

Fendi Suyanto shared this problem 5 years ago
Resolved

Hi Team,


I was doing some clean up and moving the views and reports to different folder.

Then I try to delete the old folder I am getting errors below

- This folder is being used by:


- 25 views


You must delete or move this content before deleting the folder.

For other folder we get an error saying still being use by 20 reports

Both of the folder don't have any objects, and we are not sure how to delete from database level as well.

Please advise how we can delete those folder.

Thanks,


Fendi Suyanto

Replies (4)

photo
1

Hi Fendi,

I found instructions on how to do this with our Ski Team Database, you would want to adjust these queries accordingly.

To check the actual records to see if there is any content in these categories or sub categories then run the below query:

SELECT 'View', ViewId as 'ID', ViewDescription as 'Name'

FROM ReportView

WHERE ViewStatusCode IN ('OPEN','DRAFT')

AND ViewTypeCode = 'DRAGANDDROP'

AND ContentCategoryCode = 'TUTORIAL'

AND ContentSubCategoryCode = 'ATHLETES'

UNION

SELECT 'Report', ReportId as 'ID', ReportName as 'Name'

FROM ReportHeader

WHERE ReportStatusCode IN ('OPEN','DRAFT')

AND CategoryCode = 'TUTORIAL'

AND SubCategoryCode = 'ATHLETES'

UNION

SELECT 'Dashboard', GroupId as 'ID', ShortDescription as 'Name'

FROM ReportGroup

WHERE StatusCode IN ('OPEN','DRAFT')

AND GroupTypeCode IN ('ANALYTIC','KPI')

AND CategoryCode = 'TUTORIAL'

AND SubCategoryCode = 'ATHLETES'

UNION

SELECT 'Storyboard', StoryboardId as 'ID', Title as 'Name'

FROM Storyboard

WHERE StatusCode IN ('OPEN','DRAFT')

AND CategoryCode = 'TUTORIAL'

AND SubCategoryCode = 'ATHLETES'

You can also check the summary table for categories using this query:

SELECT *

FROM ContentManagement

WHERE ContentTypeCode = 'TUTORIAL'

AND ContentCode = 'ATHLETES'


Lastly, you can check the categories and their actual names/descriptions using this query.

SELECT *

FROM OrgReferenceCode

WHERE RefTypeCode = 'RPTSUBCATEGORY' AND RefCode = 'ATHLETES'


SELECT *

FROM OrgReferenceCodeDesc

WHERE RefTypeCode = 'RPTSUBCATEGORY' AND RefCode = 'ATHLETES'


Logically, if there are no records for the first query on the content then you should be able to remove the other records that appear in the other queries. You would need to update the category names and codes as well.

As usual, you should back up the config db before running any queries.

Does this help get the folders analyzed and removed as desired?

Thanks,

Eric

photo
1

Hi Fendi,

Just wanted to check in to see how the cleanup went?

Thanks,

Eric

photo
1

HI Eric,


We end up reinstall the system and import back the content.

Please close the ticket.


Thanks,


Fendi Suyanto

photo
1

Thanks for the reply, Fendi. I will go ahead and mark this as Resolved.

Best Regards,

Eric

Leave a Comment
 
Attach a file