Tsugite Labs

kintone 用プラグイン · PC / モバイル対応

テーブル行数の調整

テーブルの行数を整えて保存する

「テーブル行数の調整」は、レコード追加画面で指定した行数まで行を補い、保存時に空行を削除するプラグインです。帳票用に最低 5 行を残す設定や、行数が上限を超えた場合に保存を中断する設定もできます。条件に合うときは、行の追加ボタンと削除ボタンを非表示にできます。

ダウンロード

テーブルごとに設定できます

  1. プラグインをインストールし、対象アプリに追加してください。
  2. 対象のテーブルと初期行数を選択してください。初期行数は 1〜50 行です。
  3. 「保存時に空行を削除する」「保存時も初期行数を保つ」「初期値だけの行も空行とみなす」を選択してください。上限は 0 で無効、初期行数以上 1000 以下の整数で有効です。
  4. 必要に応じて、行の追加ボタンと削除ボタンを非表示にする条件を選択してください。
  5. 設定を保存し、「アプリを更新」を実行してください。
テーブルごとに初期行数、空行削除、行数の上限と、行の追加・削除ボタンを非表示にする条件を設定する画面
架空のアプリを使った設定例です。日本語と英語に対応します。

空行を削除してから必要な行数を補います

保存時は空行を削除し、「保存時も初期行数を保つ」が有効なら不足分を補います。最後に上限を確認します。「保存時に空行を削除する」と「保存時も初期行数を保つ」の両方を有効にし、初期行数が 5 行で入力済みが 2 行なら、その 2 行を残し、空の行を 3 行補います。「保存時に空行を削除する」だけを有効にすると、空行を除いた行数で保存します。

入力済みの 2 行と帳票用の空行 3 行を残す動作例
架空のデータを使った動作例です。

条件に合うときは行の追加・削除ボタンを非表示にします

テーブルごとに、行の追加ボタンと削除ボタンを非表示にする条件を設定できます。たとえば「区分」が「確定」のときは追加ボタンを非表示にする、特定の組織に所属していないユーザーには削除ボタンを表示しない、といった使い方ができます。条件は、レコード追加画面と編集画面を開いたときと、条件に使うフィールドの値を変更したときに判定します。kintone が 2026 年 10 月に追加した JavaScript API を使い、PC とモバイルの両方で動作します。

導入前にご確認ください

外部サービスへの通信は行いません。設定画面は、同じ kintone 環境からフィールド一覧とプロセス管理の設定を取得します。ボタンの条件に組織かグループを指定した場合に限り、追加・編集画面でも同じ環境からログインユーザーの所属を取得します。

ダウンロード

v0.2.0・22665 bytes。ZIP をダウンロードできます。

ダウンロード

Table Row Manager

Fill tables to 1–50 initial rows on the record creation page, remove empty rows on save, and enforce an optional limit of up to 1000 rows. Each table has independent settings. A limit of 0 disables it.

Empty rows are removed before applying “Keep the initial row count when saving” and checking the limit. “Keep the initial row count when saving” takes priority over “Remove empty rows when saving”. Static defaults can be treated as empty, including manually entered matching values. Dynamic defaults and populated lookups are retained. Tables with an Attachment field are excluded from empty-row removal, regardless of whether files are attached. Initial row counts and limits still apply. Calculated fields are ignored when checking whether a row is empty; rich-text HTML counts as data.

New rows use the saved defaults, current date/time and login user. Other dynamic selection functions are not populated. Save settings again after changing fields, and validate required fields, permissions, lookups and other customizations in a test app. The plugin supports desktop and mobile create/edit pages, and leaves details, inline editing, CSV and REST writes unchanged. Deletion confirmation is not included. No data is sent to external services. The settings page retrieves fields and process management settings from the same Kintone environment.

Each table can also hide its add-row and delete-row buttons while a condition is met: always, a field value outside tables, the login user (login names, department codes or group codes), or a process management status. Conditions are checked when the page opens, and field conditions again whenever the field changes. The buttons are hidden for the whole table, not for individual rows, and CSV imports and REST API requests can still add or delete rows. This uses the JavaScript APIs Kintone added in October 2026; without them, the buttons are left unchanged. When a condition lists departments or groups, the record pages load the login user’s memberships from the same Kintone environment.