VariableCollection.VarName Property

[Read-only] This property returns the encoded name of the variable at the specified index.

Syntax

VarName (index)

Parameter Description
long index The index into the VariableCollection of the variable.

Example Code (Visual Basic):

' This example opens a variable collection and lists each variable's name and type.
 
dim vc
Set vc = Server.CreateObject ("HotDocs_Online.VariableCollection")
 
vc.Open "c:\InetPub\wwwroot\templates\template.hvc"
 
for i = 0 to (vc.Count -1)
    Response.Write "Name: " & vc.VarName(i) & "<br>"
    Response.Write "Type: "
    select case vc.VarType(i)
        case ansTypeText
            Response.Write "Text Variable"
        case ansTypeNumber
            Response.Write "Number Variable"
        case ansTypeDate
            Response.Write "Date Variable"
        case ansTypeTF
            Response.Write "True/False Variable"
        case ansTypeMC
            Response.Write "Multiple Choice Variable"
    end select
    Response.Write "<hr>"
next