GetMatchingRepeatingFormsCount( )
获取与作为搜索关键字提供的项值匹配的表单的重复表单实例数。
语法
GetMatchingRepeatingFormsCount('variable1', value1, 'variable2', value2, ...)返回值
匹配重复表单实例的计数。
注:
在日期中,UNK 值被视为与任何其他值匹配。例如:'Date(01-Feb-2022)' 和 'Date(20-Feb-2022)' 都被视为具有 UNK-Feb-2022 日期值的条目的匹配项。
使用提示
- 可以接受选项控件(单选控件、复选框控件和下拉列表),但只能按标签而非值进行搜索。
- 只能提供一个选项作为选项控件的搜索文本。
- 必须在字符串
'Date(dd-mmm-yyyy hh:mm:ss)'内提供日期。 - 您可以采用以下格式使用部分日期:
- <dd-mmm-yyyy hh:mm>
- <dd-mmm-yyyy hh>
- <dd-mmm-yyyy>
- <mmm-yyyy>
- <yyyy>
- 必须在字符串
'Time(hh:mm:ss)'内提供时间。 - 您可以采用以下格式使用部分时间:
- <hh:mm>
- <hh>
示例 3-57 如果有多个实例的 AE 结果 = 'Fatal',则引发查询
// Raise a query if there is more than one instance where AE Outcome = 'Fatal"
// Get current repeating instance
var ins = GetCurrentRFInstance();
var curVal = "";
// Get value of aeOut from current instance
var rfData = getRFValues('ins', [aeOut] );
if(rfData.exists && rfData.aeOut){
if((rfData.aeOut) !== "[]"){ // If the choice control has been cleared out then do not read the label
curVal = JSON.parse(rfData.aeOut)[0].label;
}
}
// check to see if there are more than 1 instance with "Yes"
return ((curVal == "Fatal") && (GetMatchingRepeatingFormsCount('aeOut', "Fatal") > 1))?false:true;父主题:重复表单功能