AnswerCollection.SetUploadedAnswers Method
This method populates an AnswerCollection object with answers posted from a desktop version of HotDocs. In desktop HotDocs, you can specify a component file property that allows answers from an offline interview to be uploaded to a server. The SetUploadedAnswers method accepts these answers, parses them, and populates the answer collection with the results. The first parameter is a variant. It contains a SAFEARRAY of the posted data. This can be obtained in an ASP by a call to Request.BinaryRead. The second parameter (size) is a number which indicates the size (number of bytes) of the SAFEARRAY. There is an extra answer added to the answer collection which indicates the name of the assembled document. The name of the answer is _template_. Querying the answer collection for this answer will return the name of the template given in the Answer History portion of the posted answers.
Syntax
void SetUploadedAnswers ( object answers , int size )
Parameters | Description |
answers | The byte-array which contains the answers uploaded from a desktop version of HotDocs. This can be obtained from a call to Request.BinaryRead. |
size | The size of the byte-array. This can be obtained by a call to Request.TotalBytes. |
Example
' This example creates an AnswerCollection and populates it with answers uploaded ' from desktop HotDocs. It then determines the name of the template in which the ' answers are given. dim ac Set ac = Server.CreateObject ("HotDocs_Online.AnswerCollection") dim count count = Request.TotalBytes dim data data = Request.BinaryRead (count) ac.SetUploadedAnswers data, CInt(count) dim i dim templatename for i = 0 to ac.Count -1 answer.GetAnswer ac,i if answer.Name = "_template_" then templatename = CStr(answer.Value) end if next