Returns the member ID of a validation account, given the index of the account.
Note: | You can also obtain the member ID of the primary validation account with GetValidationAccount. |
<HsvMetadata>.GetByIndexValidationAccount lIndex, plAccountID
Argument | Description |
---|---|
lIndex | Long (ByVal). The index of the validation account. An application has settings for the primary Validation Account and a series of validation accounts; the names of these settings take the form of Validation Account n. The index is one-based and corresponds to n. For example, to obtain the member ID of Validation Account 2, pass 2. |
plAccountID | Long. Returns the member ID. If there is no validation account corresponding to the specified index, -1 is returned. |
The following function returns the label of the validation account for the specified index.
Function getValAcctName(lIndex As Long) As String Dim lId As Long, cMetadata As HsvMetadata, cTreeInfo As IHsvTreeInfo Dim sLabel As String 'g_cSession represents an HsvSession instance Set cMetadata = g_cSession.Metadata Set cTreeInfo = cMetadata.Accounts cMetadata.GetByIndexValidationAccount lIndex, lId cTreeInfo.GetLabel lId, sLabel getValAcctName = sLabel End Function