Syntax

stat = REPINS(tag, position, text)

Arguments

stat, position: integer

tag: database variable

text: text

Meaning

Inserts text as occurrence position of database variable tag. All subsequent occurrences will move down to accommodate the new entry. If the action is successful, stat will be 0, otherwise unequal to 0.

If the tag is part of a data dictionary field group, an empty occurrence at the same position will automatically be created for each of the other fields in the group, so that field group occurrences stay together. If, after inserting a new field group occurrence, you want to fill one of the still empty fields of the new group occurrence, simply use a tag[occurrence_number]=value assignment, not repins (since repins creates a whole field group occurrence).

Example

repins(%1, 3, 'Bloggs, J.')

Result

The text Bloggs, J. is inserted as the third occurrence of tag %1.

See also

NULL