Cicode Programming Reference > Cicode Function Categories > Form Functions Introduction > FormGetData

FormGetData

Gets all data associated with a form and puts it into the output string buffers. Normally the field data is copied to the output string buffers only when the user selects the [OK] button. If you want to use the data while the form is displayed, call this function to get the data. You should call this function only while the form is displayed otherwise an error is returned, for example, from a field callback function.

Syntax

FormGetData(hForm)

hForm:

The form handle, returned from the FormNew() function. The form handle identifies the table where all data on the associated form is stored.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

FormCurr

Example

! Field callback to save data.
FUNCTION Save()
INT hForm,hField;
FormCurr(hForm,hField);
FormGetData(hForm);
! Access all data.
..
END

See Also

Form Functions