Use this function to return the numeric value of a field. On numeric formatted fields, this function operates the same as the @ function, however, NUM automatically converts a non-numeric field into its numeric content.
NUM (Field, Section, Form, Group)
Parameter |
Description |
Field |
Enter the name of a section field.The default is the current field. |
Section |
Enter the name of a section that contains the field you specified. The default is the current section. |
Form |
Enter the name of a form that contains the section and/or field you specified. The default is the current form. |
Group |
Enter the name of the form group that contains the form, section, and/or field you specified. The default is the current group. |
The system uses the parameters provided to search for one field on a section and return that field’s data as a number. The field does not have to be defined as a numeric data type.
Here are some examples:
(Assume the current field value is ABC1234.23XYZ and is named MyField. Also, assume that a second occurrence of MyField appears on the form, MyForm, and contains the value automobile.)
Function |
Result |
Explanation |
NUM( ) |
1234.23 |
Returns the value in the current field as a number. Notice that any non-numeric value is removed before returning the value. |
NUM ("MyField") |
1234.23 |
Returns the value in the named field, located on the current section. |
NUM("MyField\2", , "MyForm") |
0 |
Since the second occurrence of MyField on this form does not contain any numeric values, the result is zero (0). |
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices