This function is called by HotDocs (if the Unicode version of this function, SetFieldW, is not defined) 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 2005 SP2. Earlier versions of HotDocs will not call this function. If you need HotDocs to pass a Unicode string to this function, use SetFieldW.
long SetField ( long recordID, LPCSTR fieldName, long typeID, LPCSTR 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 SetField(long recordID, LPCSTR szFieldName, long typeID, LPCSTR value)
{
return HD_SUCCESS;
}