Skip to main content

Recoding Groups and Materials

This tool renumbers the codes of the materials and sub groups under a group you choose, so that each one gets a new code that starts with a prefix followed by a sequence number. The tool runs as soon as you click Ok, with no confirmation question. For the practical steps, see Recode groups and materials.

Opening the window​

  • From the main ribbon: Materials > Tools > Tools > Recoding Groups and Materials. The command shows if your licence includes warehouses. You need the Recoding Groups and Materials permission in Users Management, on the Operations page. It is one check box that allows using the command.
  • From the Chart of Materials: right-click a group (other than a group of menu items) and choose Recode Groups and Materials. The window opens with the group already chosen and its code known. On this route the program does not ask for the permission above.

Fields and buttons​

FieldDescriptionRequiredValues and rules
GroupThe group whose materials and sub groups are recoded.YesChoose from the list (see Lookup boxes, edit boxes and search windows). The code of the group itself does not change. When you choose a group, the program puts in Seperators Count the number of digits of the count of its direct materials (0 if it has none, 1 up to 9 materials, 2 up to 99, and so on up to 6).
prefixText that the new code starts with.NoIf you leave it empty, the codes start with the code of the chosen group. Example: GR.
Seperators CountThe number of digits of the sequence number; missing digits are filled with zeros on the left.NoA number. More than 6 counts as 6. If you type less than the number the program put, or leave it empty, the program uses the number that is enough for the material numbers, so it cannot be less. When the window is opened from the Chart of Materials it shows 0, and the program uses the number of digits that is enough.
IndexingThe order of the numbering in the chosen group.YesSequence Number for Input (first value): the order in which the cards were created. Name: the order of the names.
ButtonWhat it does
OkRecodes at once, then shows "Operation successfully completed", closes the window and refreshes the Chart of Materials.
CancelCloses the window with no change.

How the program builds the codes​

The tool writes new codes in the cards of the materials and sub groups. It does not change their names or any other field.

  1. The first level: the materials of the chosen group, then its direct sub groups, ordered by Indexing and numbered 1, 2 and so on in sequence. The numbering of the sub groups continues after the last material, so if the group has 12 materials, the first sub group is numbered 13.
  2. The code is the prefix (or the code of the chosen group if you left it empty) and then the sequence number written with a fixed number of digits. For materials, the number of digits is the larger of the digits of the count of materials and Seperators Count. For sub groups, it is the number of digits of the total of materials and sub groups.
  3. The next levels: for each sub group, what is under it (its materials and its groups) takes the new code of that sub group followed by a sequence number that starts from 1 for each kind. Materials get a number with at least the digits of the first level, and groups get enough digits for their count. The prefix is not used here, since it is already part of the code of the sub group. Indexing does not control the order of these levels.
  4. If the new code of a material in a lower level equals the current code of a material in another group, the program adds the word "Duplicated" to its code (in the Arabic interface «مكرر»). Materials of the first level are not checked this way.
  5. A material that is a combination of another material (one of the combinations of a material) takes the new code of its parent material followed by a dash and the codes of the segments of the combination, separated by dashes. These materials use up a sequence number in the first level, so a gap can appear in the numbering of the other materials.

Example​

The group "Groceries" has the code G02, three direct materials and no sub groups. Indexing is Sequence Number for Input:

What you typeThe resulting codes
No prefix, Seperators Count 1 (the value the program put)G021, G022 and G023
No prefix, Seperators Count 3G02001, G02002 and G02003
Prefix GR, Seperators Count 3GR001, GR002 and GR003

A larger example: the group 10 has 12 direct materials and two sub groups, Seperators Count is 2 (the value the program put), and there is no prefix. The materials are 1001 to 1012, and the two sub groups are 1013 and 1014. If the group 1013 has three materials and one sub group, its materials are 101301, 101302 and 101303, and its sub group is 10131.

Messages​

MessageWhy it appearsWhat to do
Unacceptable Field ValueYou clicked Ok and Group is empty or not accepted.Choose a group from the list.
Error in PrcReorderMatsCodesThe recoding command failed in the database. It appears in English in every language.Try again, and if the error repeats, contact support. Do not assume that nothing changed.
Operation successfully completedThe recoding ended.Open the Chart of Materials and check the codes.

After success the program records the operation in the operations log with the text "Group Name" and the group name, "Prefix" and what you typed, and "Number of characters" and what is in the field.

The tool cannot be undone. The old codes are not kept, and material codes may be used outside the program (printed barcodes or import files), so tell the people who depend on them before you run it.

This page applies to alameen ERP 10, version 10.1.79.764.