getCurrentCycle( )

检索当前周期实例编号。

注:

此规则帮助程序函数不支持用于“屏幕候选项”规则执行。

语法

getCurrentCycle()

参数

无。

返回值

指示循环实例编号的编号:
  • 正数表示当前周期实例编号。
  • -1 (如果目标表单不在周期访问中)。

示例

示例 3-99 如果当前周期实例为偶数(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");
}