Skip to content · Zum Inhalt

Copy a column to another column

Copying takes the value of one field and writes it into another field of the same record, for every record of the selection. It is the quick way to fill a new field from an old one.

Before you start

  • Both fields have to be ones you may modify, and their types have to fit.
  • The target field cannot be part of the primary key.

Copy the values of one field into another

  1. On the grid, choose Copy Column to Column.
  2. In Column Operation, type the source field in Field No. and the target field in Target Field No.
  3. Confirm the question, which names both fields and the number of records.

A value that is read in one place and written in another

What happens

Every record of the selection gets the source value in the target field, in one transaction. The target cannot be a key field — "A primary key field cannot be copied to. Rename it record by record." — and the two types have to fit: "The value of %1 cannot be copied to %2: the types do not match." The message at the end is "Copied %1 records.", and every changed record is written to the log.

Example

The preset 10007, name MK, description Contoso, keeps the field filter WH-03 and its field list. The user copies one of those fields into another of them for every record of table 104 the filter ITEM-003 selected, and the grid shows the target column with the copied values.

Choose a target field the copy refuses

  1. On the grid, choose Copy Column to Column.
  2. In Column Operation, type the source field in Field No. — the AssistEdit offers the fields the grid holds.
  3. Type the target field in Target Field No.
  4. If the target is part of the primary key, the dialog refuses the copy with "A primary key field cannot be copied to. Rename it record by record." and no record is changed.
  5. Choose another field as the target, or rename the records one by one.

The two texts of a copy and the option that decides how much of a value changes

What happens

Both fields are checked before a record is read: the target has to be a field of the table that is not part of the key, and the two types have to fit. A refused copy writes nothing at all, so no record is left half changed, and the message names the reason rather than the field.

Example

The preset 10007, name MK, description Contoso, keeps table 104 with the table filter ITEM-003. A user copies Code ↑ into Description and every record of the filter gets the code in its description. The same user who types Description in Field No. and Code ↑ in Target Field No. is refused, because the key of a record cannot be written by a copy.

If something goes wrong

What you seeWhyWhat to do
"The value of %1 cannot be copied to %2: the types do not match."The two fields have incompatible types.Choose two fields of the same kind.
"A primary key field cannot be copied to. Rename it record by record."The target is part of the primary key.Rename the records one by one instead.
Some records keep their old valueThe table's validation refused the copied value there.Read the error and correct the source value.