Development > Utilities > Miscellaneous > Key change set up 

This function is used to define recoding rules that can be used to rename object keys automatically. It is only available for objects whose "Change the key" option is activated.

The main objective is to simplify a multi-legislation setup by changing the codes of setup elements.

For instance, let us consider a Sage X3 reference folder defined with journal codes such as "FRVEN", "SPVEN", "ITVEN", "PTVEN" to define sales journals used in each of the French, Spanish, Italian and Portuguese legislations. Given the fact that these journals have different characteristics, they must be identified by different codes. But if a folder containing only Italian companies is created, then only the journal code "ITVEN" will be created. In this case, it can be useful to recode this journal into "VEN" for simplicity purposes.

This utility makes it possible to carry out this type of recoding by identifying, via a code, a set of code change lines to be carried out. These code changes can be triggered:

  • either via a dedicated function, to which the code identifying all the key changes to be perform is given.
  • or upon creation of a folder (it is then possible to give a template defining all the renaming codes to be performed).

An example of a possible recoding list is is described below:

Object 

Object title

Identifier 1

Identifier 2

Description

New code

ADI

Miscellaneous table

ACO

1

 

ZZZ

JOU

Journals

SPVEN

 

Ventas

VEN

For each line of the grid, the key change is thus the equivalent of the manual key change performed by the user (but using this function makes it possible to automate all the code changes into a single operation).

Prerequisites

SEEREFERTTO Refer to documentation Implementation

Screen management

The screen is presented in the form of a grid with several lines: each line corresponds to a key change definition.

If the key is made up of two parts, the two key parts are entered, but the key part to recode is indicated first. For instance, if the user decides to modify the key of a miscellaneous table, the table number is the second entered, and the code in the table, which will be recoded, is entered first.

Entry screen

Fields

The following fields are present on this tab :

Block number 1

Code identifying the current record.

  • Description (field INTIT)

Use this field to assign a description to each record.

  • Active (field ENAFLG)

Select this check box to activate the current record.

Disabled records keep their content and setup but cannot be used by recalling their code:

  • On other records such as documents and settings
  • On mass processes

The authorizations for a given function can prohibit the creation of an active record. In this case, the check box is disabled by default. It can only be modified by an authorized user or through a signature workflow.

Grid

Object code concerned by the recoding.

  • Secondary key (field CLE2)

If the key of the object has a single part, this field is empty.

Otherwise, the value of the second part of the object key is the element to be modified.

  • Former code (field VAL1)

This is the key value of the object to be modified

  • Description (field DES)

Enter the description of the relevant record.

This long description is used as a title in screens and reports.

  • New code (field NEW1)

This is the new value of the key which must replace the former value 'Identifier 1'.

Close

 

Action icon

Loading

This function is used to load in the grid all the other keys of the table corresponding to the current line. For instance, to recode all the codes of a miscellaneous table, enter the first code, then return to the line in "entry" mode and, with a right click, request the loading: all the other lines of the miscellaneous table in question will then be loaded, and the last step will be to define the new codes displayed next to them.

Selective loading

This function is used to pre-load a list of the lines to rename by indicating the corresponding object and a filter criterion.

 

Close

 

Recoding of the calculation formulas

In some cases, codes are used in the form of a constant in calculation formulas. Automatic journals are the most frequent example. In order to enable the recoding utility to recognize keys written in the form of constants in formulas, a particular technique can be used. Instead of entering the key associated with an object (for example JOU) in the form of a constant (for example "FRVEN"), the following formula will be used in the automatic journal:

Func ACHANGE.C("FRVEN","JOU")

The ACHANGE.C function systematically returns the value of the first parameter ("FRVEN" in this example); typing this formula is thus equivalent to entering the "FRVEN" constant. However such formulas are detected by the recoding function. That is why, if a line exists for the JOU object, which associates to the FRVEN code a new VEN code, the recoding function will replace the formula with

Func ACHANGE.C("VEN","JOU")

Note that, in the case of a two-part table, the formula should be entered in the following form: "CLE1~CLE2". For instance, in order to rename the FRCHQ code into CHQ in miscellaneous table number 306, the following formula must be used:

Func ACHANGE.C("306~FRCHQ","ADI")

Specific Buttons

The following fields are included on the window opened through this button :

Block number 1

  • field OBJET

 

  • field CLES

 

Block number 2

  • From folder (field DOSORG)

Use this field to define the folder from which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

  • All folders (field TOUDOS)

Use this option to copy the record to all the folders defined in the dictionary (ADOSSIER table of the current solution).

  • To folder (field DOSDES)

Use this field to define the folder to which the record will be copied. The possible syntaxes are described in the Dedicated appendix.

Close

This button is used to copy the record definition from or to another folder.

Menu Bar

Options / Execution

This function is used to launch the execution of the recoding.

Error messages

The only error messages are the generic ones.

Tables used

SEEREFERTTO Refer to documentation Implementation