Show or Hide Add Table Row Buttons

Show or Hide Add Table Row Buttons - kintone.app.record.showAddTableRowButtons(fieldCode, state)

Shows or hides the Add row buttons of the specified Table field.

Function

Desktop

kintone.app.record.showAddTableRowButtons(fieldCode, state)

Mobile

kintone.mobile.app.record.showAddTableRowButtons(fieldCode, state)

Parameters

Parameter Type Required Description
fieldCode String Yes The field code of the Table field to show or hide the Add row buttons for.
state String Yes Specify one of the following values.
  • VISIBLE: Shows the buttons.
  • HIDDEN: Hides the buttons.

Returns

A Promise object.
When the Promise object is fulfilled, no value is returned.

Sample Code

The following code shows and hides the Add row buttons of a Table field with the field code Table.

1
2
3
4
5
6
7
8
kintone.events.on(['app.record.create.show', 'app.record.edit.show'], async (event) => {
  // Show the Add row buttons
  await kintone.app.record.showAddTableRowButtons('Table', 'VISIBLE');

  // Hide the Add row buttons
  await kintone.app.record.showAddTableRowButtons('Table', 'HIDDEN');
  return event;
});

Available Pages

Desktop and Mobile

  • Record Create
  • Record Edit

Notes

The display state of a Table field and the display state of its Add row buttons are managed separately.
The display state of the Add row buttons can be changed even if the Table field is hidden with the Show or Hide Field API.
However, the Add row buttons do not appear on the page while the Table field is hidden.

If you hide both the Add row buttons and the Delete this row buttons , the table column that contains the row controls is hidden on desktop.
On mobile, the area that contains the row controls is hidden.