---
title: "Auto-numbering & composite Code Format (Trading Parties)"
canonical: "https://wiki.soft1.eu/space/SS5EN/243990713/Auto-numbering%20%26%20composite%20Code%20Format%20(Trading%20Parties)"
format: markdown
---
DEMO SA company wishes, each time a new Supplier is posted, the code to consist of elements, which are included in the Supplier's profile card. Except for the auto-numbering, which holds the four last places (11-14), the first **digits** of the **Prof**. **Category **abbreviation shall hold the place 1 and 2. The first **digits **of the **Geographical Area **abbrevation shall hold the 4 and 5 places and the first three **letters** of the **Currency** abbreviation shall hold the 7-9 places, e.g. 0-10-EUR-0000.

**Configuration**  
Regarding auto-numbering process with the above-described code format, proceed as follows:

- specify the suitable **Code Format **e.g. NN-NN-LLL-NNNn, as displayed at the following screen,
- click on the hyperlink:
  - fill in the **From, To **fields (by setting the range),
  - fill in the **Formula **field (apply drag & drop or double-click on Item fields or type the proper command e.g. RunSQL('select shortcut from socurrency where socurrency=' +String(SUPPLIER.SOCURRENCY)) and
  - **activate** the **Auto-Numbering** parameter**.**

<u>*Tip: Use SOFT1 ERP functions and SQL commands at Formula section in order to get the preferable results.*</u>

Finally, click <**Accept**> and then <**Save**>. 

> ℹ️ To activate the general parameters features, you should re-open the respective Entity (Stock Items, Trading Parties etc).

Once the configuration is completed, open the Suppliers' List to post the first Trading Party (entry). At first, the "??-??-???-*" format is suggested, which will be gradually filled in as the user defines/ selects the Supplier's preferable fields. Finally, fill in manually the code, which indicates the beginning of the auto-numbering. From now on, the next available code shall be suggested. 


![code_format_en520_04 (1).jpg](media://ec04665d-64b4-493b-a08f-290ba8f0cb29)