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:

  1. Choose File > Manage > Database.

  2. Click the Fields tab.

  3. If your database contains more than one table, select the appropriate table from the Table list.

  4. Select an existing field or define a new one.

  5. 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:

    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:

Copy
JSONSetElement ( "{}" ; 
  [ "fm_common" ; "Address" ; JSONString ] ; 
  [ "fm_table_view" ; "Street Address" ; JSONString ] 
)

Then the resulting JSON object is:

Copy
{
  "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.