Getting the Converted Value of a Field Entry

The edit buffer for a data field contains exactly the string that is in the field, including any protected characters. For numeric fields, this string is a string representation of the number. There are several cases where you need the converted value of a field, not necessarily the string representation.

If your validation function needs the numeric value of a numeric field, you need to get the converted value of the field.

A validation function for a memo field does not get a pointer to an edit buffer; the only way to get the value of a memo field is to call fld_get() to get the converted value of the field.

In addition, in some cases your field or form validation function needs to get the value typed into a different field on the form. Unless the FORCECONVERT option is ON for that field, you cannot use the underlying data variable, because it has not been updated with the information that the user typed. In this case, you should also get the converted value of the field.

To get the converted value of a field, you first need to get a pointer to that field.

More:

Getting Pointers to Fields and Scrollable Regions

Getting the Contents of a Field


Home Contents Previous Next