FormFields
Create, update, delete, and query the Form Fields in Kintone.
Select
The AppId column is required in the WHERE clause. The server will use the Kintone APIs to filter the results by this column. By default, the server will process other filters client-side within the server.
For example, the following queries are processed server side:
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
The AppId, Type, Code and Label columns are required in the INSERT statement.
INSERT INTO FormFields (AppId, Type, Code, Label) VALUES (6, 'SINGLE_LINE_TEXT', 'Text__single_line_CRUD', 'Test')
Insertion can also be executed by providing the AppId column and Properties column as a json aggregate:
INSERT INTO FormFields (AppId, Properties) VALUES (6, '{"Text__single_line_TD":{"type":"SINGLE_LINE_TEXT","code":"Text__single_line_TD","label":"Test"}}')
The Kintone API supports Bulk Insert as well:
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
You can update FormFields in two different ways, depending on your use case:
Method 1: Update Using the Properties Column, If you want to update multiple form field details at once, you can use the Properties column. This column expects a JSON object that includes field attributes like code, label, and type etc. In this Method AppId column is required in where clause.
UPDATE FormFields SET Properties = '{"Text__single_line_TT":{"code":"Text__single_line_PT","label":"text","type":"SINGLE_LINE_TEXT"}}' WHERE AppId = 6
Method 2: Update Individual Columns, You can also update individual fields like label, code etc. directly without using the Properties column but this will update one field at a time. In this Method both AppId and Code columns are required in where clause.
UPDATE FormFields SET label='text', code='Item_update', type='SINGLE_LINE_TEXT' where appId=444 and code='Item';
Delete
You need to specify the comma separated values of Code column that you want to delete. The AppId Column is required to delete the FormFields.
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 |
The App ID of the kintone application. | |
| Code [KEY] | String | False |
The field code. | |
| Enabled | String | True |
The on/off settings of features. | |
| Label | String | False |
The field name. | |
| NoLabel | Boolean | False |
The Hide field name option. | |
| Type | String | False |
The field type. | |
| Required | String | False |
The Required field option. | |
| Unique | String | False |
The Prohibit duplicate values option. | |
| MaxValue | String | False |
The maximum number of characters for the field. | |
| MinValue | String | False |
The minimum number of characters for the field. | |
| MaxLength | String | False |
The maximum number of digits for the field. | |
| MinLength | String | False |
The minimum number of digits for the field. | |
| DefaultValue | String | False |
The default value. An array will be returned for fields that can set multiple default values. | |
| DefaultNowValue | String | False |
The Default to the record creation date option. | |
| Options | String | False |
An object including data of the field's options. | |
| Align | String | False |
The layout of the options. | |
| Expression | String | False |
The formula expression used in the field. | |
| HideExpression | String | False |
The Hide formula settings for the field. | |
| Digit | String | False |
The Use thousands separators option. | |
| ThumbnailSize | String | False |
The size of the image thumbnail in pixels. | |
| Protocol | String | False |
The Link type settings for the field. | |
| Format | String | False |
The display format for fields with calculations. | |
| DisplayScale | String | False |
The number of decimal places to display for the field. | |
| Unit | String | False |
The Currency settings of the field. | |
| UnitPosition | String | False |
The display position of the Currency. | |
| Entities | String | False |
An array listing the preset users for the field. | |
| ReferenceTable | String | False |
An object containing the settings of the Related Records field. | |
| LookUp | String | False |
An object containing the settings of the Lookup field. | |
| OpenGroup | String | False |
The Show fields in this group option. | |
| Fields | String | False |
An object containing data of fields in a table. The parameters of this object are the same as the properties parameter. | |
| Revision | String | True |
The revision number of the App settings. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| Lang | String |
The localized language to retrieve the data. |
| IsPreview | Boolean |
By setting this to False, you will be able to retrieve the Form Field details of the live App. Default value is true. |
| Properties | String |
Only used for performing Insert or Update. |