Adding multiple records

After opening a record list from an Service Manager file, the Mass Add function allows you to add a block of records to the database. The new records are exact duplicates of those in the original record list. You can also execute format control triggers and macros by setting the add field to true. Mass Add processing statements use the $file parameter to access fields on records in the current record list. For example, name in the $file parameter or the number one (1) in the $file parameter.

You can choose to add exact duplicates only to databases where keys are defined as Nulls & Duplicates or there are No Nulls in the database dictionary. Adding duplicate records in any other manner causes Database Manager to issue an invalid duplicate key error message for each record. To avoid this error when executing a Mass Add function against a file with Unique or No Duplicates keys, execute processing statements during the Mass Add function that will manipulate the contents of the new records.

Related topics

Format Control
Service Manager macros
Multiple-record functions
Updating multiple records

Key type definitions
Mass add/update function errors
Service Manager Programming