getCycleCount( )

現在のサブジェクトの入力ブランチ内のサブジェクトごとの現在のサイクル・インスタンス番号を取得します。たとえば、既存のサイクルの数を取得できます。

構文

getCycleCount(branchShortName)

パラメータ

branchShortName

カウントするブランチの短縮名。

戻り値

サブジェクト分岐サイクルインスタンス番号を返します。サブジェクトが分岐で指定されていない場合は -1を返します。

注意:

ブランチ名が試験バージョン間で変更された場合、isStudyVersion( )関数を使用して適切な名前を取得します。

例3-98 Branch01に開始サイクルが1つ以上ある場合は、ドロップダウン値をtrueに設定します

// get the current cycle count of branch 'Branch01'
var cycleCount = getCycleCount('Branch01');
  
// if at least 1 cycle has been started in Branch01, set value to true
if (cycleCount > 1) {
  return setChoiceLabel("TRUE");
} else {
  return setChoiceLabel("FALSE");
}