checkFieldUnique(fieldName, fieldValue, msg)
概述
判断字段的唯一性。
返回值
String
参数
1、fieldNameString
文档的字段名
2、fieldValueString
文档的字段值
3、msgString
提示信息内容
示例
描述:
实现checkFieldUnique(fieldName, fieldValue, msg)函数的应用,判断字段的唯一性(校验脚本)
iScript 代码:
//判断表单某字段值是唯一的 (校验脚本) (function(){ var value=getItemValueAsString("唯一校验名称"); var msg = "名称:"+value+ "已经存在,请输入其它内容。"; var rtn=checkFieldUnique("唯一校验名称", value, msg); return rtn; })()