4D v14.3SET FIELD TITLES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
SET FIELD TITLES
|
SET FIELD TITLES ( aTable ; fieldTitles ; fieldNumbers {; *} ) | ||||||||
aTable | Table |
![]() |
Table for which to set the field titles | |||||
fieldTitles | String array |
![]() |
Field names as they must appear in dialog boxes | |||||
fieldNumbers | Longint array |
![]() |
Actual field numbers | |||||
* |
![]() |
Use the custom names in the formula editor | ||||||
SET FIELD TITLES lets you mask, rename, and reorder the fields of the table passed in aTable or aSubtable when they appear in standard 4D dialog boxes, such as the Query editor, within the Application environment (more specifically, when the editors are called using 4D language commands).
Using this command, you can also rename on the fly the labels of the fields in your forms, if you used dynamic names. For more information about inserting dynamic field and table names in forms, refer to the 4D Design Reference manual.
The fieldTitles and fieldNumbers arrays must be synchronized. In the fieldTitles array, you pass the name of the fields as you would like them to appear. If you do not want to show a particular field, do not include its name or new title in the array. The fields appear in the order you specify in this array. In each element of the fieldNumbers array, you pass the actual field number corresponding to the field name or new title passed in the same element number in the fieldTitles array.
For example, you have a table or subtable composed of the fields F, G, and H, created in that order. You want these fields to appear as M, N, and O. In addition you do not want to show field N. Finally, you want to show O and M in that order. To do so, pass O and M in a two-element fieldTitles array and pass 3 and 1 in a two-element fieldNumbers array.
The optional * parameter indicates whether or not custom names defined using this command can be used in 4D formulas.
Note: If your application provides access to the formula editor (for example via the Quick report editor), you must pass the * parameter in order to ensure interface consistency.
SET FIELD TITLES does NOT change the actual structure of your table. It only affects subsequent uses of the standard 4D dialog boxes and forms using dynamic names when they are called using language commands (the real structure of the database is displayed when the editor or form is called from a menu command in Design mode). The scope of the SET FIELD TITLES command is the worksession. One benefit in Client/Server mode is that several remote 4D stations can simultaneously “see” your table in different ways. You can call SET FIELD TITLES as many times as you want.
Use the SET FIELD TITLES command for:
WARNING:
See example for the SET TABLE TITLES command.
Product: 4D
Theme: User Interface
Number:
602
Modified: 4D v11 SQL
Field name
GET FIELD TITLES
Get last field number
SET TABLE TITLES
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)