Set default rows in a table

Introduction

This article introduces how to set multiple default rows and values in a table using JavaScript customization.

 
default_rows_static.png

Applicable events

This customization can be applied to the following events:

In this example we will use the app.record.create.show event.

Sample App

Create an App including a Number field and Text field arranged into a table. Set the table field code to "Table". To see how to create a table, refer to the How to Create a Table article in the Kintone Help Center. The table field code can be set from the same grid icon to the right of the table after the table has been set.

Field Type Field Name Field Code
Number Number Number
Text Tips Tips

US_1.PNG

 

Sample code

Save the following sample code in a text editor, and upload it to the JavaScript and CSS Customization settings of the Kintone App. 

Execution Result

Add a new record into your App. 

default_rows_gif.gif

When a record is added, the table populates with default rows and values. 

Finally

A similar customization is possible using other events such as app.record.edit.show, app.record.create.change, and app.record.edit.change events. Using these events, you can for example add and delete table rows by clicking the record edit button or by changing the value of  radio buttons in your App.

Was this article helpful?
0 out of 0 found this helpful
Do you have any questions or issues related to this article?
Please share your views with us in the Community forums!