HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 4 Advanced Forms Design

TABLE CHECKS

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Used to verify that the field value is either in a list (table) of values, or is not in that list.

Syntax

[{IN
NIN} value1[,value2]...["message"]]

Parameters

value

The values specified in the list may be any mixture of field names, save fields, constants, numeric expressions, or it may be an index retrieve operand within parentheses. Refer to "Statement Syntax" earlier in this section for details.

message

Specifies a custom error message.

Discussion

Each element in the list must result in a single value to be matched exactly, except for leading and trailing blanks in the field. There is an implicit OR between the elements of the list so that the statement can be understood as:

Is current value equal to (IN) value1 OR value2 OR...
Is current value not equal to (NIN) value1 NOR value2 NOR...

One system defined table, $STATE, is provided that consists of a list of all two-character United States state and territory codes (see Appendix F for a list of the codes). This list is in alphabetic order and can be compared successfully with all upper or lowercase codes. The $STATE constant may be used anywhere a table is legal in the statement syntax.

As with other comparison, values must match the field data type; that is, a numeric field can only be compared to a list of numeric values, a date field to a list of date values, and a character field to a list of character values.

Example

IN 12, 14, 16, 18, 20

Current value must be one of the five listed numbers.

NIN "CA", "ME", "NY"

Current value must not be any of the three listed values.

IN $STATE, MX

Value must be legitimate state code or be MX. The system constant $STATE can be in a list including other values.

Native Language Support

NATIVE-3000 must be used to define values for date and numeric fields within FORMSPEC. VPLUS will convert the value when the forms file is executed to be consistent with the native language selected. Table checks specified within FORMSPEC may contain any character in the 8-bit extended character set consistent with the selected language ID. For more information on Native Language Support, see Section 8.

Feedback to webmaster