Overview of Field Codes
A field code is a string used for specifying a field in formulas and APIs.
Each field comes with a default field code. You can change the field code to a value of your choice.
Characters that can be used for field codes
The characters that can be used for field codes are as follows.
- Hiragana
- Katakana (half-width and full-width)
- Kanji
- Alphanumeric characters (half-width and full-width)
- The following special characters:
- Half-width underscore (_)
- Full-width underscore (_)
- Half-width middle dot (·)
- Full-width middle dot (・)
- Full-width currency symbols (e.g., $, ¥)
The following symbols and special characters cannot be used in field codes.
- () (parentheses), 「」(corner brackets), [] (square brackets), 【】(black lenticular brackets), {} (curly brackets)
- Special characters such as @ + ~ # % & ' = | ^ * ; : ?
If you use any of the special characters listed above, they will be replaced with underscores (_) when the settings are saved.
For example, if you set the field code "A&B", it will be changed to "A_B".
Also note that spaces cannot be used.
Field codes that contain spaces will be changed as follows when the settings are saved.
- If there are spaces before or after a field code, they will be deleted.
- If there are spaces in the middle of a field code, they will be replaced with an underscore (_).
Points to note when setting a field code
If the field code you have entered contains any characters that cannot be used for a field code, an error message will appear when you click the save button located at the right of the input field for the field code or the save button on the field setting dialog.
Make sure to keep in mind the following points when you set a field code.
- A field code must be between 1 and 128 characters long.
The field setting cannot be saved if the input field for the field code is empty. - Set a field code that is not yet used for any other field on the app form.
If you enter a field code that is already used for another field on the app form, the field code will be suffixed with an underscore (_) followed by a number (e.g., "string_0") when you save the settings. - A field code cannot begin with a number.
If you enter a field code that begins with a number, a half-width underscore (_) is prefixed to the field code when you save the settings. - The following strings cannot be set as field codes.
- Status
- Assignee
- Categories
- __ROOT__
- not
- When you place a field on the app form, the value of the field name is automatically set as the field code.
For the following fields, the field codes are preset before they are placed on the app form. The preset field code is the value of the field name.
Record number, Created datetime, Updated datetime, Created by, Updated by
If you want to use the field name value of any of the aforementioned fields as the field code of another field on the app form, you need to change the preset field code to a different one, since it is not possible to set the same field code for multiple fields on the same app form.
Example: Using the field code of the "Record number" field with a different field
Steps
Follow the steps below to check or set a field code.
-
Click the App settings icon (the gear-shaped icon) at the upper right of the View screen.
-
On the App settings screen, click the Form tab.
-
On the form settings screen, hover your cursor over the Settings icon (the gear-shaped icon) at the upper right of a field, then click Settings.
-
On the field's settings dialog, check the string under Field code.
If you want to change the field code, click the Edit icon next to the field code, enter a new field code, and then click Save. -
Click Save form at the upper left of the form setting screen.
-
If you are creating a new app, click Activate app and click OK on the confirmation dialog.
If you are changing the settings of an existing app, click Update app and select Update app on the confirmation dialog.
Example: Using the field code of the "Record number" field with a different field
-
Click the App settings icon (the gear-shaped icon) at the upper right of the View screen.
-
On the App settings screen, click the Form tab.
-
Place the Record number field on the app form and change the field code to a different one (e.g., "Record_number_1").
-
Place a field of your choice on the app form and change the field code to "Record_number".
-
Click Save form.
-
Delete the Record number field that you placed on the app form in step 1.
If an error message appears
If an error message appears when you set a field code and click the save button, refer to the Points to note when setting a field code section for the possible cause.
Check the section and make sure that the field code you have set does not contain any invalid characters.