V
VAL(expC)
Data Format Returned: Numeric
Converts a character string to a numeric value. Not fully compatible with FH Enterprise.
VAL() is partially functional in FH Enterprise when used in queries.
If VAL() is specified for a query field using a custom expression, FH
Enterprise performs a two stage query - after the query runs on the server
and the results are sent to the client, the second stage is run to convert
values from character to numeric.
If a query was created in standard FH and then upsized, access the query and re-save it to create the two-stage query.
VAL( ) can be used to convert character fields. This is helpful
when the field is used for sorting.
Parameters
| Variable | Description |
|---|---|
| expC |
Specifies the character expression to convert to numeric. Note: Example: |
Valcode(cCategory,cCode,lQuiet,lRequired)
Data Format Returned: Numeric
Validates a single code against a lookup table. Valcode()
does not work for complex validations like street or city/state/zip (which
have multiple values that are validated). It validates only simple single
"codes."
Parameters
| Variable | Description |
|---|---|
| cCategory |
The name of the
lookup table category that contains the code you want to validate. These
are all in the table |
| cCode |
The actual code value you want to validate. |
| lQuiet |
Should normally be passed as true. If you do not pass it as true or don't pass it at all and the validation fails, a message box is displayed. |
| lRequired |
If passed as |
Valcode() is used in the example below to tell an external data import
definition to only enter a value in a field if the value matches a code
in the FH lookup table. INCI TYPE
is the lookup category, and the import definition is importing an ASCII
comma-delimited import where the value of Inci_type
field is coming from data(4) in the source file.
For the import field definition for INCI_TYPE,
use a custom expression as follows:
IIF(ValCode("INCI TYPE",data(4),.T.),data(4),"")
This expression returns the value of data(4)
only if ValCode returns true (indicating
it is a valid incident type), otherwise an empty string is returned, leaving
the target field blank.
VendorName(expC)
Data Format Returned: X
Returns the name of a vendor given a vendor ID.
Parameters
| Variable | Status | Description |
|---|---|---|
| expC | Required | Vendor ID to return name of. |