Related Information Examples & Tutorials

How To Change Labels On The Attachment Form

The Attachment form in the Demonstration database provides a very good introduction to customizing field labels. Field captions change depending on the choice you select in the Type field. This is accomplished using a pick list and control file. Try it!

How Aliases Work

The caption on a field is called its "Alias." By default, the fields on the Attachment form have no aliases defined. A quick Right click the form, selecting Properties from the resulting menu, can confirm this. The reason new labels appear whenever the Type field is changed is that Collect! uses a control file to override the default labels. Aliases should not be necessary on the fields if you are using a control file, as the control file provides all the information.

If you were to Right click the Type field and select Properties, or alternately if you were to select System - Form Properties from the top menu, the same control file would be attached to both the Type field and the Attachment form itself. You can examine the settings of both to confirm this.

Top of page.

Examining The Control File

You should be able to open and view the control file. It will consist of a long series of lines in the following form.

@SETat.i1.caption = "House #" if (@at.ty = Assets)

These lines will be separated into blocks based on the value of the type field, which you can see in the phrase 'if (@at.ty = Assets)'. The field names come from the same codes used in the report writer, a complete list of which is available from our online help. Please refer to Database Fields for a list of UNIQUE IDENTIFIERS for field names.

Top of page.

Modifying The Control File

You can simply copy one of the blocks of text, changing the word in the statement 'if (@at.ty = Assets)' to reflect the name of the new type you are introducing and changing the caption to the desired field name.

For example, the previous line, once copied, could be modified to read:

@SETat.i1.caption = "Date Last Pymt" if (@at.ty = "Bankruptcy 1")

Keep in mind that any field names or captions with spaces should be enclosed in quotation marks. Assuming your default settings remain in the field and form settings, you should be able to add new types to the pick list on the Type field, and add to the control file to set the field names as you wish.

Top of page.

See Also

- How To Modify Or Create A Pick List
- How To Use Control Files
- Changing A Field Label

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments: helpinfo@collect.org