Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Subfolder
loveit
Hi
I can't search a subfolder... Need some help
I have a workspace called ****
an I have a folder with the folder id ###
how do I search a subfolder with the name YYY?
Find more posts tagged with
Comments
jny
A subfolder? Do you mean that you would like to find a document folder that resides under a workspace? If so, and if you have the folderID (Long), e.g., 29, of this document folder (IManDocumentFolder) then you should be able to get it using the IManDatabase.GetFolder(FolderID) Method. If you have the document folder's objectID, then you may use the IManDMS.GetObjectBySID(ObjectID) to return the document folder.
loveit
I did this....
1.) First I found the parent folder ID
params = myDMS.CreateWorkspaceSearchParameters()
profs = myDMS.CreateProfileSearchParameters()
params.Add(imFolderAttributeID.imFolderCustom3, client)
res = db.SearchWorkspaces(profs, params)
singleFolder = res.ItemByIndex(1)
subRes = singleFolder.SubFolders
folder1 = 0
Dim d As IManFolder
For Each d In subRes
If d.Name = "parentfoldername" Then
folder1 = d.FolderID
res2 = db.GetFolder(d.FolderID)
End If
Next
2.) Then I found the subfolder like this...
FSParams.Add(imFolderAttributeID.imFolderName, FolderName)
FSParams.Add(imFolderAttributeID.imFolderParentID, folder1.ToString)
'FSParams.Add imFolderAttributeID.imFolderID, FolderID
res = db.Session.WorkArea.SearchFolders(colDBs, FSParams)
and it works fine.
)
jny
If you don't already know the document folder's moniker or folderID, then yes, you would indeed have to refine your search criteria by building layers of search parameters like that.