1
0

More than 1 year has passed since last update.

rex0220 計算式プラグイン テーブル行内で集計

Posted at

kintone のテーブル行内で、値の集計を計算式プラグインで行います。

概要

テーブル行内の同じ科目を集計し、文字列項目に表示します。

2023-07-02_18h41_55.png

操作例

2023-07-02_18h53_34.gif

計算式プラグインの設定

科目の値をいろいろ加工するため、LET 関数で変数を利用します。
2023-07-02_18h44_27.png

.js
// まとめ
LET(a,ARRAY(_1時限目,_2時限目,_3時限目,_4時限目,_5時限目), // 科目を配列化
  b,ARRAY_SORT(DISTINCT(ARRAY_FIL(a,x,x))),  // ブランク・重複値を除外して、ソート
  c,ARRAY_MAP(b,x,x&""&ARRAY_COUNT(ARRAY_FIL(a,y,x=y))), // 科目に件数を追加した配列
  JOIN(c,", ")  // 配列を", "で連結
)
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0