Using Field Definitions when customising Chris21 forms
If you are customising Chris21 forms there are two processes to consider. The first is the Data Dictionary (DMA) where you create the field on the Chris21 file and the second is Field Definitions (FLD), where you place your newly created field onto the Chris21 form. Last week in my blog Customising Chris21 the Right Way I discussed the first part of the process.
The key point of last week’s blog was to ensure that you create the field within the user area of the file so that your customisation will be safely retained after future upgrades. Failure to do this is probably the most common cause of customisation issues.
To complete the second part of the process, go to Field Definitions. Using the example from last week, we will place the field POS GRP NUM onto the Positions (POS) form. You will need to determine a few things before you start.
Firstly, decide where you want to place the field. Usually this will be under the last field on the form. If you want to place it in the middle then you will have to move all of the fields below your insertion point down one line. I usually will just add the new field after the last field for the sake of convenience. Look at your Positions form and note the last field:
In my example, the field is Review Type. Now go to Field Definitions, select Ctrl F and type POS in the Find dialog box. From the list, find the field called Review Type:
Look for the column called Label Row. This will tell you which row Review Type is placed on. In the screenshot above the row is 27. Our new field will therefore go on row 28.
You also need to identify an appropriate field number for your new field. Be careful here because if you choose a field number that is already in use then either your new field will not be displayed or the existing field will be hidden and replaced by your new field. From the screenshot below look for the highest field number in the Field column and then add one to this number. This is the field number you will assign to your new field.
The highest field in use in our example is 49. We will use field number 50. You can now create the record to place your new field on the Positions form.
Go to Field Definitions and click New from the main menu. Enter the details for your new form as shown below:
You can see that I have used number 50 for the Field field and number 28 for the Label Row. Note also that the Data Row must also be 28 to ensure that your label and data are on the same row!
That’s all you need to do to create a new field on a form. To see the effects of your changes you will need to clear cache in Chris21. Notice that Group Number is now on your form under the Review Type field:
If you clear cache and still don’t see the changes try logging out and then back in.
This blog, along with the information in my last blog Customising Chris21 the Right Way will give you enough information to begin experimenting with basic Chris21 customisations. Of course, you should only do this in your test system until you become familiar with the process. Give this a try and let me know if you need any further information.