Skip to main content

UpdateField

Update field settings

Description

Update the field settings to match the data_type.

※The items that can be set differ depending on the data_type (type) of the field to be updated.

data_typeItem typeUnique keyUse for titleUser for search criteriaAvailability of search indexTarget for full-text searchDisplay in listNot displayed when action is executedNot displayed in API results
textText
textareamulti-line text
selectOptions
radioRadio
checkboxCheckbox
autonumAuto numbering
numberNumerical value
calcCalculation formula
datetimeDate and time
fileAttachment
usersUser
dslookupData reference
labelLabel
separatorSeparator

Method

PUT

Request URL Format

/api/v0/applications/:app-id/datastores/:datastore-id/fields/:field-id

URL Params

app-id          : アプリケーションID(Hexabase画面から入力したID)
datastore-id : データストアID(Hexabase画面から入力したID)
field-id : フィールドID(Hexabase画面から入力したID)

Request URL Sample

PUT https://api.xxx.com/api/v0/applications/624bea3a879f4e8d8b5dcc6f/datastores/639912c0b1ea5632b8bc0545/fields/63991301fa9223af047f436f

Payload

{
"name": "フィールド名", // Screen item name
"search": true, // Set "Use as search condition"
"show_list": true, // Set "Show in list"
"as_title": false, // Set "Use as Title"
"full_text": false, // Set "Target for full-text search"
"hideOnInput": false, // Set "Do not display when executing action"
"hide_from_api": false, // Set "Do not display in API results"
"has_index": false, // Set "With or without search index"
"roles": [ // Permission settings
"MEMBER", // Specify role ID
"624bea3a879f4e8d8b5dcc72",
]
}

Setting items by data_type

data_type: select, radio

Please see CreateFieldOptions, etc. for additional option updates

{
"selected": "91b81ac7-907b-4d7b-bc27-4e1d53241ac3", // Specify the o_id of the option you want to be the initial selection
}

data_type: checkbox

Please see CreateFieldOptions, etc. for additional option updates

{
"selected": ["91b81ac7-907b-4d7b-bc27-4e1d53241ac3", "91b81ac7-907b-4d7b-bc27-4e1d53241ac4"], // Specify the o_id of the option you want to be the initial selection
}

data_type: autonum

{
"autonum_info": {
"prefix": "PREFIX-", // Specify prefix
"zero_padding": true, // Zero padding
"digit": 3 // Specify the number of digits when zero padding
}
}

data_type: number

{
"num_info": {
"prefix": "PREFIX-", // Specify prefix
"suffix": "-SUFFIX", // Specify suffix
"no_comma": true // Do not separate thousands with commas
},
"min_value": "10", // Specify minimum value for input check
"max_value": "1000" // Specify maximum value for input check
}

data_type: calc

{
"calc_info": {
"formula": "{Fld-O9DRbjC0}+1", // Set formula. Can be used in calculation formulas by enclosing the field ID with { }
"calc_target_fields": [
"63ce11f063c4431d4443e881" // Set field ID for calculation formula
],
"prefix": "PREFIX-", // Specify prefix
"suffix": "-SUFFIX", // Specify suffix
"no_comma": true // Do not separate thousands with commas
}
}

data_type: datetime

{
"min_value": "2023-01-23T16:21:52.000Z", // Specify minimum value for input check
"max_value": "2023-01-24T16:21:52.000Z" // Specify maximum value for input check
}

data_type: file

{
"file_info": {
"show_img": true // Preview images on the Hexabase management screen
}
}

data_type: users

{
"users_info": {
"users_show_workspacemembers": false, // View workspace members
"users_publish_userfield": true, // Publish to specified users
"single_select": false, // Select single user
"users_show_mygroup": true, // View the members of the group to which you belong.
"roles": [
{
"has_relation": true, // Set true
"r_id": "624bea3a879f4e8d8b5dcc70", // Set role ID
},
{
"has_relation": true,
"r_id": "624bea3a879f4e8d8b5dcc72"
}
],
"groups": [
{
"g_id": "62b92e2768805f4d43812291", // Specify group ID
"has_relation": true
},
{
"g_id": "63159cc93e323584c62139ef",
"has_relation": true
}
]
}
}

data_type: dslookup

{
"dslookup_info": {
"dslookup_project_id": "624bea3a879f4e8d8b5dcc6f", // Specify the application ID for the database reference
"dslookup_datastore_id": "624d172b719ba29522e3c11f", // Specify the datastore ID of the database reference
"dslookup_field_id": "6254d681e0eb8314120db69f" // Specify the field ID (unique) of the database reference
}
}

※Please inquire separately if you would like to confirm details.

Response Sample

null