0
0

More than 1 year has passed since last update.

rex0220 計算式プラグイン 複数選択の扱い方

Posted at

複数選択項目の選択肢を設定する計算式のお問合せがありましたので、まとめておきます。

複数選択項目の設定例

複数選択に A、B、Cという選択肢があり、 A、B、C のドロップダウン項目の値が入っている項目と同じ名前の選択肢が自動選択される。

2023-01-26_00h25_32.png

操作例
2023-01-26_00h38_57.gif

計算式

※複数選択とチェックボックスは、どちらも複数の選択肢を持つため、同じ計算式で値を設定できます。

// ARRAY 関数に、ARRAY 関数で値を並べる
ARRAY(
  IF(A,ARRAY("A"),ARRAY()),
  IF(B,ARRAY("B"),ARRAY()),
  IF(C,ARRAY("C"),ARRAY())
)

// または、文字列を要素として並べる
ARRAY(
 IF(A,"A",ARRAY()),
 IF(B,"B",ARRAY()),
 IF(C,"C",ARRAY())
)

2023-01-26_00h29_34.png

0
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
0
0