BrcEvent_MatchDocument event

Occurs after the Import from Briefcase dialog box is shown by the View Briefcase dialog box and occurs for each file in the briefcase.

Syntax

BrcEvent_MatchDocument (Batch, Briefcase, DocumentID)

Parameters

Name

Description

Batch

An object that represents the files contained within the briefcase.

Briefcase

An object that represents the briefcase file.

DocumentID

ID of the vault document to match to the current briefcase record. If one is found, then upon input it contains the ID. If a match could not be found using built-in Meridian logic, then it is empty and the user-defined logic in the event handler can help find a match.

Remarks

Not available in Meridian Power.

Use this method to match vault documents to files within a briefcase for which the existing metadata is insufficient. The current briefcase metadata record is available as a Briefcase.CurrentRecord property object.

Note    Implementing this event will delay the opening and refreshing of the briefcase dialog box.

Example

This example searches for vault documents with the same name as in the briefcase and that have a value of Work in Progress for the property SYS.Rootbranch.

Sub BrcEvent_MatchDocument(Batch, Briefcase, DocumentID)
    Dim strFileName  'The filename we are looking for
    Dim objDocsFound 'Result of search
    Dim arrFindCriteria
    
    If Len (DocumentID) = 0 Then
        strFileName = Briefcase.CurrentRecord.Filename  
        arrFindCriteria = Array(_
            Array("SYS.Rootbranch", IC_OP_EQUALS, "Work in Progress"))
        Set objDocsFound = Vault.FindDocuments(strFileName, Empty,_
            arrFindCriteria, False)
        
        If objDocsFound.Count > 0 Then
            DocumentID = objDocsFound.Document(0).ID
        End If
    End If
End Sub