Answer.ValueIndexes Property

[Read-only] This property returns an Nx4 dimension array containing repeat indexes for all Values contained in an Answer, where N is the number of Values and each row in the array represents the repeat index set for a particular Value. If an Answer is "unanswered," the return value is empty. This property allows an integration to easily learn the details of all repeated Values of an Answer, which would be much more difficult using other API methods.

Syntax

object ValueIndexes [ get ]

Example (ASP)

<html>
<body>
<%
    dim ac
    dim an
    Set ac = Server.CreateObject ("HotDocs_Online.AnswerCollection")
    Set an = Server.CreateObject ("HotDocs_Online.Answer")
    ac.Open "C:\Inetpub\wwwroot\answers\test.anx"
%>
<TABLE cellSpacing=1 cellPadding=1 width="75%" border=1>
    <TR bgcolor="yellow">
        <TD><b>Answer</b></TD>
        <TD><b>Name</b></TD>
        <TD><b>Type</b></TD>
        <TD><b>Value</b></TD>
    </TR>
<%
    for i = 0 to (ac.Count -1)
        an.GetAnswer ac,i
        Response.Write "<TR>" & vbCrLf
        Response.Write "<TD>" & i & "</TD>" & vbCrLf
        Response.Write "<TD>" & an.Name & "</TD>" & vbCrLf
        Response.Write "<TD>"
        select case an.Type
            case 1
                Response.Write "Text"
            case 2
                Response.Write "Number"
            case 3
                Response.Write "Date"
            case 5
                Response.Write "TF"
            case 6
                Response.Write "MC"
            case 0
                Response.Write "Unanswered"
        end select
        Response.Write "</TD>" & vbCrLf & “<TD>”
        dim av
        Set av = Server.CreateObject ("HotDocs_Online.Answer")
        dim indexes
        indexes = an.ValueIndexes
 
        if not IsEmpty(indexes) then
            for k = LBOUND(indexes,1) to UBOUND(indexes,1)
                av.GetAnswer ac,i,indexes(k,0),indexes(k,1),indexes(k,2),indexes(k,3)
                Response.Write "<br>" & CStr(indexes(k,0)) & "," & CStr(indexes(k,1)) & "," & CStr(indexes(k,2)) & "," & CStr(indexes(k,3)) & " : <b>" & CStr(av.Value) & "</b>"
            next
        end if
         
        Response.Write "</TD>" & vbCrLf
        Response.Write "</TR>" & vbCrLf
    next
    ac.Close
    set ac = nothing
    set an = nothing
%>
</TABLE>
</body>
</html >