0421 817 265
Customising Chris21 – How to create a new field

I have written in the past about customising Chris21 and how to do it properly. From my experience I have seen many examples of bad customisations and have helped clients to fix these so that they don’t continue to cause problems in the future. My blog Chris21 Customisations – Do it Right, talks about this issue and explains the sort of problems you can experience with bad customisations.

The wrong way to create a new field in Chris21 is to take an existing field and use it for a different purpose. I can’t emphasise this enough. Sure it’s easy to grab a field that’s already there, rename the field and maybe even use it to store text rather than a numeric value. But it’s not that hard to create a new field either. Let me explain.

I will use the example of customising Chris21 by adding a new field onto a form. I always recommend that whenever you are customising Chris21 that you start in your test environment. Once you have done this and tested the results, you can then copy your changes into the production system.

The first thing to understand is that there are two areas on each Chris21 file, the system area and the user area. You don’t want to do your Chris21 customisations in the system area. I discuss this in my blog Customising Chris21 – What Can Go Wrong?

Your starting point is to find the start position of the user area of the file. You do this by viewing the File Table (FIL) entry for the Chris21 file you want to customise. As shown below, there is a field on the File Table entry called User Area Start.

Customising Chris21

In the example above, the User Area Start number is 1133. We will use this number later when we create the new field. The other important field is the Storage Size. In this example, the Storage Size of the EMPOS file is 122. This means you can add multiple fields to this file to a combined total of 122 characters.

Even though we can see that the User Area Start number is 1133, it is nevertheless very important that you confirm this before creating a new field in this location. You confirm this by reviewing the Data Dictionary (DMA) entries for the EMPOS file. To do this, go to DMA and from the list of Field Codes create a Quick Filter where Field Code equals EMPOS.

Customising Chris21

This will display all of the fields that are included on the EMPOS file. You must review all of the start positions to confirm that number 1133 hasn’t been used by previous customisations. If it has, keep looking in case there are more customised fields after 1133. When you have found the highest start position number that has been used in the user area, remember to add the field Storage Size onto this number. For instance, if the highest start position number is 1148 and this field’s Storage Size is 6, then the next available start position number is 1154.

Once you have the start position number you can begin to add your new field. Open DMA and click New from the main menu. A typical DMA entry that has been created for a numeric field is shown below.

Customising Chris21

As you can see, this field has been created at start position 1133 which is in the user area. If you wanted to add another field the start position will be 1135 – 1133 plus the 2 characters that the previous field used.

You now have a customised field that will not be adversely affected by future upgrades to Chris21. If you ensure all of your customisations are done this way you can be confident that customisation issues will be eliminated in future system upgrades.

This can be a difficult area if you have had limited experience customising Chris21. Leave a comment and let me know if you require some more information on this topic. In my next blog I will demonstrate how to place this new field on the Positions (POS) form ready for use.