EnumDocumentsEx

Enumerates the names of the documents that match the specified criteria, as well as the documents’ descriptions, timestamps, security classes, privacy flags, content types, owners, file types, and document types. You can also filter for public or private documents.

This information is returned in arrays that have a one-to-one correspondence with each other.

Tip:

EnumDocuments is a similar method that enumerates only the documents’ names, descriptions, timestamps, and security classes.

Syntax

<HFMwManageDocuments>.EnumDocumentsEx (bstrPath, varalDocumentType, varalDocumentFileType, vbFilterByCreateTime, dStartTime, dStopTime, lShowPrivateDocs, pvarabstrDescriptions, pvaradTimestamp, pvarabstrSecurityClass, pvarabIsPrivate, pvaralFolderContentType, pvarabstrDocOwner, pvaralFileType, pvaralReportType)

Argument

Description

bstrPath

The document repository folder that contains the documents.

Input argument. String subtype.

varalDocumentType

The document type of the documents to be enumerated. Document types are represented by the HFMConstants type library constants listed in Document Type Constants.

Input argument.

varalDocumentFileType

The file type of the documents to be enumerated. File types are represented by the HFMConstants type library constants listed in Document File Type Constants.

Input argument.

vbFilterByCreateTime

Specifies whether information will be returned for only those documents with timestamps in a specified range. Pass TRUE to filter by timestamp, FALSE otherwise.

If you pass TRUE, information will be returned for only those documents with timestamps that fall into the range specified by the dStartTime and dStopTime arguments.

Note:

If you pass FALSE, the dStartTime and dStopTime arguments will be ignored, but will still require a value.

Input argument. Boolean subtype.

dStartTime

The beginning of the timestamp filtering range.

Tip:

To make the beginning of the range open-ended, pass 0 (zero).

Input argument. Double subtype.

dStopTime

The end of the timestamp filtering range.

Tip:

To make the end of the range open-ended, pass 0 (zero).

Input argument. Double subtype.

lShowPrivateDocs

Specifies whether to return public documents, private documents, or both. Valid values are represented by the HFMConstants type library constants listed in Showing Public and Private Documents.

Input argument. Long subtype.

pvarabstrDescriptions

Returns an array of the documents’ descriptions.

Input/output argument.

pvaradTimestamp

Returns an array of the documents’ timestamps.

Input/output argument.

pvarabstrSecurityClass

Returns an array of the documents’ security classes.

Input/output argument.

pvarabIsPrivate

Returns an array indicating whether the documents are public or private. TRUE indicates private, FALSE indicates public.

Input/output argument.

pvaralFolderContentType

Returns an array indicating the types of documents that folders can contain. This value has meaning only for folders; ignore array items that correspond to document types other than folders.

Valid values are represented by the HFMConstants type library constants listed in Document Type Constants.

Input/output argument.

pvarabstrDocOwner

Returns an array containing the usernames of the documents’ owners.

Input/output argument.

pvaralFileType

Returns an array of the documents’ file types. File types are represented by the HFMConstants type library constants listed in Document File Type Constants.

Input/output argument.

pvaralReportType

Returns an array of the documents’ document types. Document types are represented by the HFMConstants type library constants listed in Document Type Constants.

Input/output argument.

Return Value

Returns an array of the documents’ names.

Example

The following function takes a folder path and returns an HTML table that lists the folder’s public data forms and the usernames of the forms’ owners.

Function GetDocAndFolderTypes(sPath)
Dim cHFMDocuments, vaDocNames, vaDescs, vaTime, vaSecClass, sRet
Dim vaPrivate, vaContent, vaOwners, vaFileTypes, vaReportTypes
Set cHFMDocuments = _ 
   Server.CreateObject("Hyperion.HFMwManageDocuments")
' cHFMSession is a previously set HFMwSession object
cHFMDocuments.SetWebSession cHFMSession
vaDocNames = cHFMDocuments.EnumDocumentsEx(sPath, _ 
   WEBOM_DOCTYPE_ALL, WEBOM_DOCFILETYPE_ALL, _
   FALSE, 0, 0, ENUMSHOWPRIVATEDOCS_DONTSHOW, vaDescs, _ 
   vaTime, vaSecClass, vaPrivate, vaContent, vaOwners, _ 
   vaFileTypes, vaReportTypes)
sRet = sRet & "<table cellpadding=2>"
sRet = sRet & "<tr><td><b>Form</b></td>" & _ 
   "<td><b>Doctypes</b></td>" & _ 
    "<td><b>file types</b></td></tr>"
For i = lBound(vaDocNames) to uBound(vaDocNames)
   sRet = sRet + "<tr><td>" & vaDocNames(i) & "</td>"
   sRet = sRet + "<td>" & vaReportTypes(i) & "</td>"
   sRet = sRet + "<td>" & vaFileTypes(i) & "</td></tr>"
Next
sRet = sRet + "</table>"
GetDocAndFolderTypes = sRet
End Function