Without autoarchivization OT administrator has to once a year/month review all the folders and create subfolders with proper date and exclude them from main OT Index. Otherwise your OT index grows so fast that Omnitracker perfomance is really bad (imagine 4GB Index file).
In order to have all your folders autoarchivized, use below script:
Autoarchivization script 'Constants and variables Dim fld, FldArchive, FldNewYear Dim y, strFolderName, strFolderArchive Dim Filter, Requests, req strFolderArchive = "FolderName\ClosedRequests" Set FldArchive = ActiveSession.GetRequestFolderByPath(strFolderArchive) Set Filter = FldArchive.MakeFilter Set Requests = FldArchive.Search(Filter, False) For Each req In Requests If Not req.UserFields("CreationDate").IsNull Then y = Year(req.UserFields("CreationDate").Value) On Error Resume Next Err.Clear strFolderName = strFolderArchive & "\" & y Set fld = ActiveSession.GetRequestFolderByPath(CStr(strFolderName)) If Err.number = 0 Then 'folder exist - move req to proper folder req.Move(fld) Else Set FldNewYear = ActiveSession.RequestFolders.Add(y, y, FldArchive) If Err.No <> 0 Then LogMessage "Error creating folder:" & Err.No & Err.Description Else 'move request to new folder req.Move(FldNewYear)
End If End If End If Next
This script should be added in ‚Scripts’ section for every folder, which should be archivized. Remember to turn off searching in archivized folders by excluding them on tab ‚Full-text search’. If you still want to include archivized folders in Full-text search, then minimize list of fields which should be used for that.
Script should be attached as Scheduled Job to OT Task Scheduler as shown below.
Now you can sleep calm – all your folders and requests will be archivized in proper manner and will be excluded from OT index. However there will be still possibility to search requests via Filters.