Resolving or Overriding the Data Reference for One Field

In addition, you can associate a data pointer with a single field on a form. The function to do this is the set field data pointer function, sf_datap():

void sf_datap(fldp_or_memop, datap, dfmp)

FIELDPTR fldp_or_memop;        /* Pointer to field                */

PTR datap;                /* Pointer to variable to hold field data    */

DFORMPTR dfmp;            /* Pointer to form                */

Generally, you will want to use sf_datap() to assign a data variable that is not included in the data structure because the data field or memo field has the OMITFROMSTRUCT field option turned on. In addition, you may want to override the data variable associated with the field by a previous call to dl_fmget() or sfm_datap(). For instance, you may want to divert the value collected in a field to a temporary variable.

Caution: If you do change the data variable associated with one or two fields, do not remove the member of the form's data structure reserved for this field. After the data references are resolved, Vermont Views relies on the data structure remaining the same. If you do not want the member in the structure, use the Designer to set the OMITFROMSTRUCT field option to ON for the field in question by selecting MODIFY-> Field->Options for data fields or MODIFY->Memo field->Options for memo fields.

You can also use this function to resolve the data references for the form by resolving them field by field.


Home Contents Previous Next