getArrayFromChoice( )
選択した選択ラベルまたはコードを複数選択質問(ドロップダウン、ラジオ・ボタン、チェック・ボックス)から配列に変換します。
構文
getArrayFromChoice(variable, [option])
パラメータ
パラメータ | 必須/オプション | 説明 |
---|---|---|
variable |
必須 | 取得する選択タイプ・フィールドに対応するルール変数。 |
option |
オプション | 選択肢コントロール値のどの要素を返すかを定義します(引用符は必須です)。
|
戻り値
この関数は、選択した選択コントロール・オプションのラベルを含む配列を返します。値が選択されていない場合、空の配列が返されます。
例)
例3-90ラベル「はい」および「いいえ」が選択されたドロップダウン(選択)コントロールd2を指定した場合
// Return the first selected label from choice item dd2:
returngetArrayFromChoice(dd2)[0];
// returns "Yes"
// Return the second selected label from choice item dd2:
return getArrayFromChoice(dd2)[1];
// Returns "No"
// Return the first selected code from choice item dd2:
return getArrayFromChoice(dd2, "code")[0];
// returns C1
親トピック: 複数選択質問関数