Related or Additional Table Processing

The dialog box is similar to the Main Table Processing dialog, but with a limited set of options, because, for example, records cannot be created or deleted. It is used both with Related Tables and Additional Tables. Refer to Main Table Processing for a description of the options in this dialog not described here.

Table name

This is read-only for related tables.

Enter the name of the additional table you want to process. Press <Ctrl+P> for a menu of tables in the database.

Identifying role

Multiple copies of a table within a program must each have a different identifying role. For example: both employee and manager details might be read from a staff table, and using the same identifying role would cause the employee record to be corrupted when reading the record for the employee's manager.

Enter the role you want to give to this copy of the table. Press <Ctrl+P> for a menu of copies of the table used in procedure bodies above this one.

The table name and identifying role identify a unique memory area, that is reserved throughout a program - so it is critical to use the correct identifying role.

Access mode

The access modes for parent tables are as follow:

Access mode Use for
Already fetched Using a record that has been set up or used in an earlier procedure body. It is often important to this type of parent up, as QAB will use the information to correctly limit the records read by the procedure - for example to read just the order lines for a previously selected order number.
Check parent on database Checking there is a matching parent record on the database when you enter the key fields of the parent - for example when entering a product code in an order detail line
Join parent from database Displaying fields from the parent table without entering key fields. Where existing records are being displayed, this option is more efficient than Check parent. Do not use this option for adding new records.
Prohibit parent Ensuring no matching parent record exists on the database. For example you might use this type of processing to refuse purchases made using stolen credit cards, or to stop an employee being scheduled for a job on a holiday.

The access modes for records for additional tables are very similar:

Access mode Use for
Already fetched  Using a record that has been set up or used in an earlier procedure body
Read record Reading the record from the database when the user enters the key or setting up the key with a formula
Setup record Initialising key fields for access in later batch procedures
Prohibit record Ensuring no matching record exists on the database when the user enters the key or you set up the key with a formula

Update table

Enable this option if you want to update this record on the database during this procedure. For example, you need to update the timesheet for a timesheet line during line entry if the total is stored on the header.

If you find this option is disabled you need to change your answers to some earlier questions as described here.

Verify table

Enable this option to check that this record is not altered by another program during this procedure.

Update condition

You can impose a condition which must be satisfied for this table to be updated. Select the required action from the Formula Editing menu.

Allow initial join fail

Enable this option if processing is allowed to continue after a join fail. For example, it may be possible to continue entering a timesheet for a given employee even if there is no manager record.

Warning validation only

Enable this option for a warning validation only. For example, allow entry of order lines for a non-existent product or of timesheets even if the employee has holiday booked.

Validation fail question

When a warning validation fails, you can ask the user if this is what he wants. Select the required action from the Message Assignment menu .

Check parent/child match

This option and the next field are for related tables only.

Enable this option to ensure that the parent really is the previously selected record. For tables where the fields being compared contain type M fields, take care when using this option within related table processing. The comparison of the child record and parent record is case sensitive. To overcome this, specify a condition on the child record as follows:

UPPERCASE(child.m_field) == UPPERCASE(parent.m_field)

Wrong parent message

You can assign a message if the parent is not the previously selected record. Select the required action from the Message Assignment menu.