FormFields
Allows you to create, update, delete, and query app fields so you can manage an app's data model programmatically.
Select
WHERE 句ではAppId カラムが必須です。connector はKintone API を使用してこのカラムによる結果をフィルタリングします。デフォルトでは、connector はクライアント側でconnector 内で他のフィルタを処理します。
例えば、次のクエリはサーバー側で処理されます。
SELECT * FROM FormFields WHERE AppId = 6 SELECT * FROM FormFields WHERE AppId = 6 AND Lang = 'en' SELECT * FROM FormFields WHERE AppId = 6 AND IsPreview = false
Insert
INSERT ステートメントでは、AppId、Type、Code およびLabel カラムが必須です。
INSERT INTO FormFields (AppId, Type, Code, Label) VALUES (6, 'SINGLE_LINE_TEXT', 'Text__single_line_CRUD', 'Test')
挿入は、AppId カラムとProperties カラムをjson 集計として指定することでも実行できます。
INSERT INTO FormFields (AppId, Properties) VALUES (6, '{"Text__single_line_TD":{"type":"SINGLE_LINE_TEXT","code":"Text__single_line_TD","label":"Test"}}')
Kintone API はBulk Insert もサポートしています。
INSERT INTO FormFields#TEMP (AppId, Type, Code, Label) VALUES (6, 'SINGLE_LINE_TEXT', 'Text__single_line_temp1', 'Label1') INSERT INTO FormFields#TEMP (AppId, Type, Code, Label) VALUES (6, 'SINGLE_LINE_TEXT', 'Text__single_line_temp2', 'Label2') INSERT INTO FormFields (AppId, Type, Code, Label) SELECT AppId, Type, Code, Label FROM FormFields#TEMP
Update
用途に応じて、FormFields を更新する方法は2通りあります。
方法1:Properties カラムを使用する更新。複数のフォームフィールドの詳細を一度に更新したい場合は、Properties カラムを使用できます。このカラムには、code、label、type などのフィールド属性を含むJSON オブジェクトを指定します。この方法では、WHERE 句にAppId カラムを含める必要があります。
UPDATE FormFields SET Properties = '{"Text__single_line_TT":{"code":"Text__single_line_PT","label":"text","type":"SINGLE_LINE_TEXT"}}' WHERE AppId = 6
方法2:個別のカラムを使用する更新。label やcode などのフィールドを、Properties カラムを使わずに個別に直接更新することもできます。ただし、この方法では1項目ずつしか更新できません。この方法では、WHERE 句にAppId カラムとCode カラムの両方を含める必要があります。
UPDATE FormFields SET label='text', code='Item_update', type='SINGLE_LINE_TEXT' where appId=444 and code='Item';
Delete
削除したいCode カラムの値をカンマ区切りで指定する必要があります。FormFields を削除するには、AppId カラムが必須です。
DELETE FROM FormFields WHERE Code = 'Text__single_line_CRUD, Text__single_line_TD' AND AppId = 6
Columns
| Name | Type | ReadOnly | References | Description |
| AppId [KEY] | Integer | False |
Identifier of the Kintone app whose form-field configuration is being retrieved or updated. | |
| Code [KEY] | String | False |
Field code that uniquely identifies the form field within the app's schema. | |
| Enabled | String | True |
Indicates whether specific field features are enabled or disabled, helping control how the field behaves in the form. | |
| Label | String | False |
Display name shown for the field in the form layout. | |
| NoLabel | Boolean | False |
Indicates whether the field's label should be hidden in the form to create a cleaner or more compact layout. | |
| Type | String | False |
Field type used in the form, determining the data format and behavior for the field. | |
| Required | String | False |
Specifies whether the field must contain a value before a record can be saved. | |
| Unique | String | False |
Specifies whether duplicate values are prohibited for the field, enforcing uniqueness across records. | |
| MaxValue | String | False |
Maximum number of characters allowed for the field, helping control input length. | |
| MinValue | String | False |
Minimum number of characters required for the field to ensure sufficient input. | |
| MaxLength | String | False |
Maximum number of digits allowed for numeric fields to control the size of accepted numeric inputs. | |
| MinLength | String | False |
Minimum number of digits required for numeric fields to enforce minimal numeric input. | |
| DefaultValue | String | False |
Default value applied to the field, returned as an array when the field supports multiple default selections. | |
| DefaultNowValue | String | False |
Indicates whether the field should automatically populate with the record creation date. | |
| Options | String | False |
Object containing the field's selectable options, such as labels and values used in dropdowns or radio buttons. | |
| Align | String | False |
Layout alignment applied to option-based fields, affecting how choices are displayed to users. | |
| Expression | String | False |
Formula expression used to calculate the field's value dynamically. | |
| HideExpression | String | False |
Indicates whether the field's formula expression should be hidden from users in the form. | |
| Digit | String | False |
Indicates whether thousands separators should be used when displaying numeric values. | |
| ThumbnailSize | String | False |
Pixel size of image thumbnails shown for fields that store images. | |
| Protocol | String | False |
Link-type configuration defining how URLs or link fields behave when opened. | |
| Format | String | False |
Display format applied to calculated fields, such as formatting numbers or dates for readability. | |
| DisplayScale | String | False |
Number of decimal places to display for numeric fields when rendering values. | |
| Unit | String | False |
Currency unit displayed with the field when the field represents financial values. | |
| UnitPosition | String | False |
Position of the currency unit relative to the numeric value in the field's display. | |
| Entities | String | False |
Array listing the preset users assigned to the field, often used for default assignees or user picker initialization. | |
| ReferenceTable | String | False |
Object containing configuration details for a Related Records field, defining how linked records are retrieved and displayed. | |
| LookUp | String | False |
Object containing lookup field settings that define how values are pulled from another app's record. | |
| OpenGroup | String | False |
Indicates whether the field group should be expanded by default when the form loads. | |
| Fields | String | False |
Object containing nested field definitions for table fields, using the same parameters as the Properties structure. | |
| Revision | String | True |
Revision number of the app settings, helping track updates to the form configuration. |
Pseudo-Columns
SELECT ステートメントのWHERE 句では、疑似カラムフィールドを使用して、データソースから返されるデータを詳細に制御することができます。
| Name | Type | Description |
| Lang | String |
Locale code used to retrieve form-field data in a specific language. |
| IsPreview | Boolean |
Indicates whether to retrieve form-field settings from the preview environment ('true') or from the live environment ('false'). The default value is 'true'. |
| Properties | String |
Value used only when performing an insert or update to supply modified field definitions. |