API Updates for November 2023
The next Kintone update is on 13th November 2023. The release also includes the following API updates.
Update Summary
On the update scheduled on February 2024, the Event Object and JavaScript APIs will be updated to handle non-numeric values when retrieving or rewriting the Number field. This option will be available in preview in the November update.
Before the update:
When using JavaScript APIs to work with the Number field, users could retrieve or rewrite with non-numeric values.
Therefore, it was necessary to implement codes to determine whether the value retrieved was a number or not.
After the update:
- When retrieving a non-numeric value,
#INVALID
is returned. - If the value in the Number Field is set to a non-numeric value, an error will occur.
This update makes it simpler to implement Kintone customization when dealing with non-numeric values, allowing a more efficient implementation. Additionally, this can reduce the costs for future product updates, leading to improved maintainability.
Release Schedule
- November 2023: Preview of the new features.
- February 2024: Official release. The feature can be disabled from the Disable New Features settings.
- May 2024: The feature will no longer be able to be disabled from Disable New Features settings.
Settings
From Kintone Administration > Other > Update Options screen, set the options as follows:
- Check Enable this feature: Changes to How Invalid Values Are Handled by JavaScript APIs for Getting or Setting "Number" Field Values
- Uncheck Enable this feature: Support for Full-Width Numbers and Separating Thousands by Commas in Number Fields on New Record and Edit Record Screens
Changes
Values that can be retrieved or changed to in the Number field
- Numbers
- "+" or "-" can be used to express positive and negative values
- "." can be used to express decimals
- "e" or "E" can be used to express exponentials
- Whitespaces
Only single-byte characters can be used for numbers and symbols.
In addition, the following values can be used for Event Objects and JavaScript APIs when changing the value in the Number fields:
undefined
null
: The value in the Number field will be empty.#INVALID!
: The value in the Number field will not be changed.
Values that are not specified above are treated as invalid values in the Number field.
Getting invalid values
Entering an invalid value in the Number field will return #INVALID!
.
Related Events/APIs
Record Create Events:
-
Onload Events
app.record.create.show
mobile.app.record.create.show
-
Field Change Event
app.record.create.change.(fieldcode)
mobile.app.record.create.change.(fieldcode)
-
Save Event
app.record.create.submit
mobile.app.record.create.submit
Record Edit Events:
-
Onload Event
app.record.edit.show
mobile.app.record.edit.show
-
Field Change Event
app.record.edit.change.(fieldcode)
mobile.app.record.edit.change.(fieldcode)
-
Save Event
app.record.edit.submit
mobile.app.record.edit.submit
Get Record:
-
Get Record Details
kintone.app.record.get()
kintone.mobile.app.record.get()
Notes
Before determining whether the value is invalid, the following actions are performed:
- PC screen:
- Conversion to Single-byte characters
- Elimination of comma separators
- Removal of spaces
- Mobile screen:
- Removal of space
Setting invalid values
Setting the value of the Number field with an invalid value using Event Objects or JavaScript API will result in an error.
Related Events/APIs
Record Create Events:
-
Onload Events
app.record.create.show
mobile.app.record.create.show
-
Field Change Event
app.record.create.change.(fieldcode)
mobile.app.record.create.change.(fieldcode)
-
Save Event
app.record.create.submit
mobile.app.record.create.submit
Record Edit Events:
-
Onload Event
app.record.edit.show
mobile.app.record.edit.show
-
Field Change Event
app.record.edit.change.(fieldcode)
mobile.app.record.edit.change.(fieldcode)
-
Save Event
app.record.edit.submit
mobile.app.record.edit.submit
Record List Event:
-
Field Change Event
app.record.index.edit.change.(fieldcode)
Set Record:
-
Set record value
kintone.app.record.set()
kintone.mobile.app.record.set()
Changing the value to "#INVALID!"
When changing the value to #INVALID!
using Event Objects or JavaScript API, the field change event will not be triggered, and the value will remain the same.
Related Events/APIs
Record Create Events:
-
Onload Events
app.record.create.show
mobile.app.record.create.show
-
Field Change Event
app.record.create.change.(fieldcode)
mobile.app.record.create.change.(fieldcode)
Record Edit Events:
-
Onload Event
app.record.edit.show
mobile.app.record.edit.show
-
Field Change Event
app.record.edit.change.(fieldcode)
mobile.app.record.edit.change.(fieldcode)
Set Record:
-
Set record value
kintone.app.record.set()
kintone.mobile.app.record.set()
Whitespaces in the mobile view
In the mobile view, if whitespaces are entered before or after a value, they will be sanitized. When whitespaces are sanitized, as long as the final value does not change, an event will not be triggered.
Target Events/API
Record Create Events:
-
Onload Events
mobile.app.record.create.show
-
Field Change Event
mobile.app.record.create.change.(fieldcode)
-
Save Event
mobile.app.record.create.submit
Record Edit Events:
-
Onload Event
mobile.app.record.edit.show
-
Field Change Event
mobile.app.record.edit.change.(fieldcode)
-
Save Event
mobile.app.record.edit.submit
Get Record:
-
Get Record Details
kintone.mobile.app.record.get()
Set Record:
-
Set Record Value
kintone.mobile.app.record.set()