This function is called by HotDocs to set a new value for a particular field of a specified record in the answer source.
This function was introduced with the release of HotDocs 2009 to support Unicode strings. Earlier versions of HotDocs will not call this function.
long SetField ( long recordID, LPCWSTR fieldName, long typeID, LPCWSTR value )
Parameters | Description |
recordID | The record identifier (key) for the record whose field is to be set. This recordID will be in an opened state ready for read/write access.
HotDocs assumes that all record IDs returned by an answer source are greater than or equal to zero. That is, negative record IDs are not allowed. |
fieldName | The name of the field that is to have its value set. |
typeID | The variable type of the field whose value is being set. |
value | The new value to be stored in the field. This string will be formatted as follows for each variable type:
|
Return HD_SUCCESS (1) if successful, and HD_FAILURE (0) if otherwise.
The following Visual C++ example returns HD_SUCCESS:
long WINAPI SetFieldW(long recordID, LPCWSTR szFieldName, long typeID, LPCWSTR value)
{
return HD_SUCCESS;
}