• No se han encontrado resultados

Estudio de caso: Implicar a los niños como mensajeros de la salud en

Values Summary A summary list of the Value Descriptions. The Validity Table Maintenance routine builds this list when Value definitions are added or updated. Manual modifications should not be applied to the list.

Note: This is the same list provided to the user at run time when the field is in error. The items in this list should be meaningful to the users of the application.

Range Summary A summary list of the range descriptions. This list is comprised of the value from the Min Desc field, the conjunction, and the Max Desc field. (These fields are defined in the Validity Range Detail Specification form.) The validity table maintenance routine builds this list when range definitions are added or updated. Manual modifications should not be applied to the items in this list.

Note: This is the same list provided to the user when a field is in error. The items in this list should be meaningful to the users of the application.

Field Description

Field Description

Condition A boolean field that controls when the Secondary File Query processing is performed. Processing is performed when the condition evaluates to true. It is not performed when the condition evaluates to false. The default is false. Refer to the section Refer to Run-Time Evaluation, page 134, for a complete description of when this condition is evaluated.

Filename The file name against which the Secondary Query is performed. It is a optional field. If the field is NULL at validation time, the query is not performed. It must be a valid Database Dictionary name.

Query Type An optional field that defines which type of query is executed.

The valid choices are v (validate) or d (duplicate check). The default is v.

A Query Type of v causes the validity routine to execute the Val Query against a specified Filename. If no records are found, it is treated as an error condition and the operator is prompted to select a valid record from the QBE list that is produced by executing the Select Query against the Filename.

A Query Type of d causes the validity routine to execute the Val Query against a specified Filename. If a record is found, it is treated as a potential error condition. The validity routine issues the Val Error Msg to the operator; however, processing continues to the next field. The operator is not prompted to correct data. This is similar to the UNIX ping function.

Allow Many? A logical field that controls the action taken when many (more than one) record is found by executing the Val Query. If more than one record is found and this field evaluates to false, then the user must select one of the records from the list or execute the Lkup Query. If a record is selected from the list, the fields

Val Query The query executed against the Filename file. When it is executed, one of three conditions will exist:

„One record is found: The data in the field being validated is considered valid and processing continues to the next field

„No records are found: The data in the field being validated is considered invalid, and the Select Query is executed

„Many records are found: Refer to the definition for the Allow Many? field.

Val Sorts An optional field that defines the key used when validity tables execute the Val Query. If this key is not valid at run time, the validity routine assumes that all values are true for the field being validated.

Val Error Msg When a field is in error, a message is sent to the operator describing the error condition. When no records are found executing the Val Query, the format of the default message is:

No records found executing the secondary query

When many records are found executing the Val Query, the format of the default message is (Note: this message is sent only when the Allow Many? option is true):

Many records found executing the secondary query

The Val Error Msg field overrides the default message with a customized message. It allows for more meaningful error messages to be sent to the user when the default message does not convey the meaning of the error.

You can concatenate literal and string variable data to create messages. For example,

"Fieldname "+nullsub($vrfield, "unknown")+" is invalid..."

Use the nullsub function, as in this example, when including variable data in a concatenated message. Otherwise, a variable whose value is NULL will render the entire message NULL.

Select Query The query executed if no records are found by executing the Val Query. The records selected from this query are all of the possible valid records from which the user can select. If no records are selected using this query the No Recs Opt is evaluated to determine how processing should continue.

Select Sorts An optional field that defines the key used when validity tables execute the Select Query. If this key is not valid at run time, the validity routine assumes that all values are true for the field being validated.

Field Description

No Recs Opt An optional field that controls if processing should continue to the next field or return to the data record when no records are selected using the Select Query. The value Proceed causes processing to continue to the next validity field. The value Return causes processing to return to the data record. The default is Proceed.

QBE Format The name of the QBE form that displays the records selected by using the Val Query and Select Query. This is an optional field. If it is NULL, the format used is filename.qbe. As a standard, it is recommended that the first field in the QBE format be the field that is copied from the Secondary File to the record being validated. This will help your users to understand which field is being copied. The other fields in the QBE list should help define the value of the field being copied.

Lookup Fields The names of the input fields copied from the record selected using the Val Query or the Select Query to the record being validated. This is a required field if a Filename is defined. Each entry is validated against the Filename Database Dictionary. If any element is not a valid field name, a window is opened from which you must select a valid field name. The data type of each element must be the same as the data type defined at the Field Level in this Validity record. There is a one-to-one

relationship between this array and the Val Fields array.

Val Fields The names of the input fields in the record being validated that are updated with data from the record selected using the Val Query or the Select Query. Each entry is validated against the first Database Dictionary defined in the Files/Formats array. If any element is not a valid field name, a window is opened from which you must select a valid field name. The data type of each element must be the same as the data type defined at the field level in this validity record. There is a one-to-one relationship between this array and the Lookup Fields array.

Field Description