getCurrentCycle( )

現在のサイクル インスタンス番号を取得します。

構文

getCurrentCycle()

パラメータ

なし。

戻り値

現在のサイクル・インスタンス番号を返すか、ターゲット・フォームがサイクル・ビジットにない場合は-1を返します。

例3-97現在のサイクル・インスタンスが偶数(2、4、6など)の場合、動的フォーム起動アイテムの値をtrueに設定します

// get current cycle instance number
var currCycle = getCurrentCycle();
 
// if cycle instance is even, set value to true
if (currCycle > 1 && currCycle % 2 == 0) {
  return setChoiceLabel("TRUE");
} else {
  return setChoiceLabel("FALSE");
}