BlueCielo Meridian Asset Management Module 2013 Administrator's Guide | BlueCielo ECM Solutions

You are here: Appendix F: VBScript reference > AMMMainTagDocumentId function

NEW  AMMMainTagDocumentId function

This user-defined function is invoked when users select a folder. Implement this function to return the ID of the main tag object associated with the active folder. If this function returns the ID of an existing document of the document type that is specified for the Object document type option on the AMM Settings tab, then the Where Used property page of the main tag object is shown for the active folder.

Syntax
Function AMMMainTagDocumentId () 
Parameters

This function accepts no parameters.

Example

The following example merely returns the first tag document found in the active folder. The function can be implemented with different search criteria to return a more specific tag document.

Function AMMMainTagDocumentId ()
    Dim Criteria
    Dim FolderDocuments 

    Criteria = Array(Array _
                    'Internal name of the Parent Folder ID property
                    ("AMDocumentPropertySet.*XC4800881716f11d1b47b000000000000%", _
                     IC_OP_EQUALS, Folder.ID))

    'Search in the folder
    Set FolderDocuments = Vault.FindDocuments(,Array("TagObject"), Criteria, False)

    If FolderDocuments.Count > 0 Then
        'Return the first document ID
        'Your implementation should return the document ID
        'that meets your requirements
    	AMMMainTagDocumentId = FolderDocuments.Document(0).ID
    End If
End Function

Related concepts

NEW Configuring linking to folders

Related tasks

NEW Configuring the proxy document type

NEW Configuring the Where Used page

Related information

NEW AMMUseMainTag function

NEW AMMPropertiesToBeRequested function

NEW PnIDLink_GetSheetSize function

NEW PnIDLink_GetAssetCoordinates function

NEW PnIDLink_IsMainDrawing function

NEW AMMGetReportTableRowValues function

NEW AMMGetReportCustomHeaderValues function


Copyright © 2000-2013 BlueCielo ECM Solutions

www.bluecieloecm.com