Home
TeamSite
Problem Getting Folder Properties
GlenW
I am writing an object that will iterate throught the document folders in a given workspace to fill them with appropriate documents. I search the database for documents that match the client/matter/class properties of each folder and then add shortcuts for each document that meets the criteria.
My problem is that I am not able to get the properties from the folder object! I'm not sure what I'm doing wrong. I've included code snippets below. Any help would be greatly appreciated.
Thanks,
Glen Wolinsky
--------- Code Snippets -----------------
Private Sub PopulateFolder(ByVal FolderToFill As imng.IManFolder)
Dim dms As New imng.ManDMS
Dim ws As imng.IManWorkspace
Dim profileParms As imng.IManProfileSearchParameters
Dim db As imng.IManDatabase = CType(ssnMain.Databases.Item(1), imng.IManDatabase)
Dim results As imng.IManContents
Dim subFolder As imng.IManFolder
profileParms = dms.CreateProfileSearchParameters
With profileParms
.Add(imng.imProfileAttributeID.imProfileCustom1, FolderToFill.CustomProperties.ItemByIndex(1).Value) 'This should be Client Number but it's blank
.Add(imng.imProfileAttributeID.imProfileCustom2, FolderToFill.CustomProperties.ItemByIndex(2).Value) 'This should be Matter Number but it's blank
.Add(imng.imProfileAttributeID.imProfileClass, FolderToFill.AdditionalProperties.ItemByName("Class").Value) 'Is NOTHING
NOTES: CustomProperties 1 & 2 and the Class property ARE filled in on the actual folder in the actual workspace.
If Not IsNothing(FolderToFill.AdditionalProperties.ItemByName("SubClass").Value) Then
.Add(imng.imProfileAttributeID.imProfileSubClass, FolderToFill.AdditionalProperties.ItemByName("SubClass").Value) 'Is correctly NOTHING
Else
.Add(imng.imProfileAttributeID.imProfileSubClass, String.Empty)
End If
End With
etc. ....
Find more posts tagged with
Comments
GlenW
If found the problem. I needed to look at the AdditionalProperties.ItemByIndex instead. All of my profile data was there.