Defining advanced field options
You can set field options for advanced features such as annotations for Data Definition Language (DDL) and customized display names.
To choose advanced field options:
-
Choose File > Manage > Database.
-
Click the Fields tab.
-
If your database contains more than one table, select the appropriate table from the Table list.
-
Select an existing field or define a new one.
-
Click Advanced, then select advanced options for the field.
To Do this Include a description of this field when a FileMaker client generates DDL
For Add annotation in Data Definition Language (DDL), enter text that describes the purpose of this field.
This annotation is included as a code comment after the field's definition in DDL generated for this field's table. A primary use for the annotation is to improve an AI model's ability to generate SQL queries for your data based on the DDL. See Best practices for database schema in DDL and SQL query generation.
Display a different name for a field in specific features
Select Customize field display names. Then, as a text expression, specify a JSON object with key-value pairs that set the field display name to use for specific features. You may want to define a field display name if the original field name might not be understood by users.
Use the following keys to specify a field display name in supported features:
-
fm_export- Displays the name in the Specify Field Order for Export dialog and in exported files that include the field name (for example, Excel). See Exporting data from FileMaker Pro and Export Records script step. -
fm_sort- Displays the name in the Sort Records dialog. See Sorting records. -
fm_table_view- Displays the name in the column header in Table View. See Setting up form, list, and table views for a layout. -
fm_common- Displays the name in all the above features, unless one of the above keys is also specified, which takes precedence overfm_common.
If no value is defined for a feature key or for
fm_common, then the original field name is used for that feature.You can also define custom key-value pairs in this JSON object for your own purposes. To retrieve all key-value pairs for a field as a JSON object, use the FieldDisplayNames function.
Note Don't create key names that begin with "fm_"; key names with this prefix are reserved by Claris.
-
Field display name example
For Customize field display names, you can use the JSONSetElement function to create the required JSON syntax in the Specify Calculation dialog. For a field named Addr, if you provide a value for one or more of the key-value pairs:
JSONSetElement ( "{}" ;
[ "fm_common" ; "Address" ; JSONString ] ;
[ "fm_table_view" ; "Street Address" ; JSONString ]
)
Then the resulting JSON object is:
{
"fm_common": "Address",
"fm_table_view": "Street Address"
}
Instead of displaying Addr, Address is used as the field display name in all supported features, except in Table View, where Street Address is used.