Modify Materials Cards
This tool writes a value that you set in one or more fields of the cards of all the materials that meet conditions, in one step: the source, the size, the barcode, the prices, the minimum and maximum limits and more. All the chosen materials take the same value. The tool does not undo what it changes, so use a precise condition and back up the file before you start. For the practical steps, see Modify material cards in bulk.
Opening the window
- From the main ribbon: Materials > Tools > Tools > Modify Materials Cards. The command shows if your licence includes warehouses and the file does not work in multi-file mode.
- You need the Modify Materials Cards permission in Users Management, on the Reports page. It is one check box that allows running the tool.
Fields and buttons
The window has two parts: Conditions (the materials that are changed) and Modify (the fields and their values).
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Materials Terms (in Conditions) | A saved condition that limits the materials changed, with a table under it that shows its lines. | No | The first value is Without, which means all the materials of the file. See Materials Terms. |
| Modify Material Code and Name (in Modify) | After the fields are changed, the program rebuilds the code and name of each changed material from the values of its fields (see Rebuilding the code and name). | No | Selected and enabled at first if the file has values defined in the card generation lists. Otherwise it is cleared and disabled. |
| Field (grid column) | The field you change. | Yes in each line | Double-click the cell and choose from the list. The program does not accept the same field in two lines. The list is in Grid fields. |
| Amount (grid column) | The value written in the field. | Yes in each line | Text or a number, depending on the field. For Size, Source, Location, Manufacturer, Model, Type, Provenance and Color the cell shows a list of values: the values in the cards and in the card generation lists, if the field has values in the generation lists. Otherwise you type the value. |
To add or delete a line in the grid, see Table Properties.
| Button | What it does |
|---|---|
| Modify | Checks the grid, then changes the cards as described in What the program does. The window stays open afterwards. |
| Close | Closes the window. It does not undo a change you already made. |
Grid fields
The Field list shows these fields in this order. The fields marked "not applied" appear in the list, but the program does not write them in the cards and does not show a message about it. There is no field for the material code: the program changes the material code here only through Modify Material Code and Name.
| Field | What the program writes |
|---|---|
| Material Name | The name. It is applied if the Allow duplicating material name option is on in Program Options. If it is off, the program does not change names, except in a file that has one material only. If a material has this name and duplicates are not allowed, "Duplicate Name" appears with the name. |
| Latin name | The Latin name. |
| Barcode | The first barcode. The program does not check here that the barcode is not used by another material, so use it for one material only. |
| Second Unit Barcode and Third Unit Barcode | Not applied. |
| Specifications | The specifications. |
| Group | Changes the name of the group that holds the chosen materials to the value; it does not move the materials to another group. Every group that holds a chosen material changes, and the new name shows on all its materials. |
| Group Code | Not applied. |
| Size, Source, Location, Manufacturer, Model, Type, Provenance and Color | The value in the matching field of the card. |
| Wholesale Unit Price, Semi wholesale Unit Price, Retail Unit Price, Export Unit Price, Distributor Unit Price and Consumer Unit Price | The price in the first unit. The value must be a number, and it is written as typed, without a currency conversion. |
| Minimum Limit and Maximum Limit | The two limits. Type both together; the maximum must not be lower than the minimum. |
| Re-Order Point | The reorder limit. A number. |
| Value Added Tax | The tax rate in the card. A number. The field shows if your licence includes material value added tax. |
| Wholesale Price in Second Unit through Consumer Price in Third Unit (twelve fields, six for each unit) | Not applied. |
| Hide in Selection Window | Type 1 to hide the materials from the selection window and 0 to show them. Any text that is not a number counts as 0. |
Materials Terms
The window uses the same Materials Terms field as Modify Group Price. The first value is Without: all the materials of the file. Materials that have combinations (segments) are not changed themselves; the materials of their combinations are changed.
What the program does
When you click Modify the program does this, in this order:
- It checks the chosen Materials Terms. The messages of Materials Terms appear if a line is incomplete.
- It checks the grid lines one by one and stops at the first incomplete line: with no field, "Please select field" appears; with no value, "Please specify the field's value that you are willing to change" appears.
- It asks "Are you sure to modify materials meeting specified conditions" with Yes and No. If Modify Material Code and Name is selected it asks a second question afterwards, as described in Rebuilding the code and name.
- It checks that no field repeats in the grid. If one does, the message "لا يمكنك إعطاء الحقل أكثر من قيمة" appears and the operation stops. This message is in Arabic in every language.
- If Material Name is in the grid, duplicate names are not allowed, and a material has this name, "Duplicate Name" appears with the name and the operation stops.
- If Modify Material Code and Name is selected, it checks the values of the fields against the lists, as described in Rebuilding the code and name.
- If you typed only one of Minimum Limit and Maximum Limit, "Must select both Minimum and Maximum limits" appears; if the maximum is lower than the minimum, "Minimum Limit must be smaller than Maximum Limit" appears.
- It runs the change command that writes the values in the chosen materials. It skips the materials that have combinations (segments) themselves, and it does not check the security level of the materials. If the command fails in the database, "Error In Stored Proc" appears with the command text, and the cards stay as they were.
- If nothing changed, because all the fields you wrote are not applied or because no material meets the condition, "No material has been modified" appears and the operation ends. Otherwise "Materials cards have been modified successfully" appears with the count under it, followed by the word "Material". The count includes the groups that were renamed.
- If Modify Material Code and Name is selected, it rebuilds the code and name, then shows the materials that were left.
- The program appends a line to the file
ModifyMats.txtin the program's log folder with the fields you wrote and their values. If Activate log file is on in Program Options, it also records a modification in the operations log for each material, with the text "Modify Materials Cards" followed by the material description, and for each group that was renamed. It does not record the materials if the change was only prices, limits, tax or the re-order point.
The tool does not keep the old values and cannot be undone. It does not change entries or issued bills.
Rebuilding the code and name
The Modify Material Code and Name check box needs values defined in the card generation lists: size, source, location, manufacturer, group, color, provenance, type and model. You define them in Generate Materials Cards.
If you select it, the program asks, after the first question: "Selecting to modify code and name will change materials codes and names. Are you sure to continue?" If you choose Yes, it does this:
- Before any change: it checks that every value you typed in Group, Size, Source, Location, Manufacturer, Model, Type, Provenance and Color exists in the matching list. If one does not, "fld Val not found" appears with the value attached to it, then "could'nt modify cause fld val not found pls add it", and the operation stops with nothing changed. These two messages are in English in every language.
- It writes the values in the cards as in the grid.
- It builds a new name for each changed material: its current name with the old values of these fields removed from it, then the new values separated by spaces, in the order you set in the generation tool.
- It builds a new code from the codes of the values of size, source, location and manufacturer, one after the other in this order. The codes of the other fields are not part of it.
- It orders the materials by their sequence number, and writes the name and the code in every card for which no other material, or the material itself, already has a code like the new one, and, if duplicate names are not allowed, no name like the new one. A material that does not meet this keeps its name and code.
- It writes the materials that were left in the file
DontModifyMats.txtin the program's log folder, one line for each material with its name and code separated by a dash, and shows "Materials name and code were not modified because code is repeated. You can see it in file " followed by the file path. What it writes is added to the file; the file is not emptied.
If the four values of a material have no codes in the lists, its code can become empty. Check the codes of the lists before you use the check box.
Example
You created a saved condition named "Food" with the text: Group equals "Groceries". You want the source of the group's materials to be "Imported", the re-order point 20, the minimum limit 5 and the maximum limit 100. You chose the condition "Food" and entered four lines in the grid:
| Field | Amount |
|---|---|
| Source | Imported |
| Re-Order Point | 20 |
| Minimum Limit | 5 |
| Maximum Limit | 100 |
Click Modify and answer Yes. The tool changes the cards of Rice, Sugar and Orange Juice, and shows "Materials cards have been modified successfully" with 3 under it followed by the word "Material". If Activate log file is on, the program records three modifications in the operations log, because Source is one of the fields that are recorded. It would not have recorded them if the change had been only the re-order point and the two limits.
Messages
| Message | Why it appears | What to do |
|---|---|---|
| Please select field | A line in the grid has no field. | Choose the field or delete the line. |
| Please specify the field's value that you are willing to change | A line has no value. | Type the value or delete the line. |
| Are you sure to modify materials meeting specified conditions | You clicked Modify and the grid is valid. | Yes to continue or No to stop. |
| Selecting to modify code and name will change materials codes and names. Are you sure to continue? | You selected Modify Material Code and Name and answered Yes to the previous question. | Yes to continue or No to stop. |
| لا يمكنك إعطاء الحقل أكثر من قيمة | A field repeats in the grid. It appears in Arabic in every language. | Delete one of the two lines. |
| Duplicate Name | Material Name is in the grid, duplicate names are not allowed, and a material has this name. | Choose another name. |
| Must select both Minimum and Maximum limits | You typed only one of the two limits. | Type both. |
| Minimum Limit must be smaller than Maximum Limit | The maximum is lower than the minimum. | Correct the two limits. |
| fld Val not found … then could'nt modify cause fld val not found pls add it | You selected Modify Material Code and Name and typed a value that is not in the generation lists. In English in every language. | Add the value to the list or clear the check box. Nothing changed. |
| Error In Stored Proc … | The change command failed in the database. In English in every language, followed by the command text. | Check the values you entered, then try again. The cards stay as they were. |
| No material has been modified | No applied field in the grid, or no material meets the condition. | Check the fields and the condition. |
| Materials cards have been modified successfully | The change ended. | Open a material card to check. |
| Materials name and code were not modified because code is repeated. You can see it in file | Materials were left with their name and code when the code and name were rebuilt. | Open the file the program mentioned. |
The messages of Materials Terms are added to these.
Related
This page applies to alameen ERP 10, version 10.1.79.764.