Auto Date population


Is it possible to have a date field auto-populate when ’ Yes’ is selected in a dropdown field? I’m looking to have the date field read-only and the populated date remain static.

Hello Dontae,
In your case the following events should be used:
app.record.create.change.(Dropdown Field Code)
app.record.edit.change.(Dropdown Field Code)

Kintone JavaScript API - Kintone Developer Program

And since you want to auto-populate when ‘Yes’ is selected in a dropdown field, if/else statement should be used. The following is an example script:

(function () {
  "use strict";

  var events = ['',
    'app.record.create.change.(Dropdown Field Code)',
    'app.record.edit.change.(Dropdown Field Code)'];, function (event) {

    var record = event.record;

    if (record['(Dropdown Field Code)']['value'] === 'Yes') {
      //Input Date
    } else {
      //Input Empty Date


Also, the following page explains about how to make a field read-only (or disabling it):

Record Edit Event - Enable/Disable field edits

I hope these helps!

Hello Yuzo,

I appreciate the provided information. I have two follow-up questions.

Field codes are RequestCompleted (this is the dropdown field ) and RequestCompletedDate (this is the date field I would like to auto-populate).

  1. Is the script formatted correctly?
  2. Where do I populate the RequestCompletedDate field code in the script?


(function() {
“use strict”;

var events = [‘’,
‘app.record.edit.change.(RequestCompleted)’];, function(event) {

var record = event.record;

//Field cannot be edited
record[‘RequestCompletedDate’].disabled = true;

if (record[’(RequestCompleted)’][‘value’] === ‘Yes’) {
//Input Date
}else {
//Input Empty Date



Hi Dontae,


You can set the value in the format YYYY-MM-DD in the “Input Date” part of the “RequestCompletedDate” field.

ex) record['RequestCompletedDate'].value = "2021-05-01";

Also, the “Input Empty Date” part can be emptied by assigning null to the “RequestCompletedDate” field.

ex) record['RequestCompletedDate'].value = null;

If a value is changed in an event, it can be reflected by returning the event object.

ex) return event;

Please take a look at the following help page for more details for this matter;

Field Types:

Record Create Event>Overwrite field values:

Record Edit Event>Overwrite field values:

Also, ‘’ (an event after the record detail screen is displayed) can not be overwritten even if you return the event object.

Record Details Event:

Available event object actions do not contain any process to rewrite the value.

For the date setting, if you want to set today’s date, etc., you can use the Date function, or the following page may be helpful to you; please take a look.


Hopefully, this helps.