1、(static) checkFieldUnique(fieldName, fieldValue, msg) 功能描述:判断字段值唯一性
示例:
//字段1值没有重复!
(function(){
var fieldName = "字段1";
var fieldValue = "字段值1";
var msg = "字段1值出现重复!";
var rtn = checkFieldUnique(fieldName, fieldValue, msg);
if (rtn==null || rtn.length <=0) {
rtn = "字段1值没有重复!";
}
return rtn;
})()
2、(static) countSubDocument(formName) → {Integer} 功能描述:根据子文档名,获取当前文档的子文档个数
示例:
//子表共有(0)条记录!
(function(){
var formName = "iscript子表单";
var count = countSubDocument(formName);
return "子表共有("+count+")条记录!"
})()
3、(static) getCurrentDocument() → {Document}
示例:
//功能描述:返回当前打开文档对象
//当前文档对象为:toString()Document:iscript示例/当前文档 字段1 字段4null 字段3null 字段2
(function(){
var cdoc = getCurrentDocument();
return "toString()" + cdoc;
})()
4、(static) getId() → {Document}
示例:
//功能描述:获取当前打开文档的ID
//当前文档ID为:CHIOhP3VlPPpOlnnB4T--__uG5fH3jncohXkjIOcgk
(function(){
var id = getId();
return id;
})()
5、getItemValue(fieldName) 功能描述:获取当前打开文档中Item的值
示例:
(function(){
var value = getItemValue("字段2");
return value;
})()
6、(static) getItemValue(fieldName) → {Object} 功能描述:获取当前打开文档中Item的值,且以日期形式返回
示例:
//获取字段3的值
(function(){
var value = getItemValueAsDate("字段3");
return value + "";
})()
7、(static) getItemValueAsDouble(fieldName) → {Double}
8、(static) getItemValueAsInt(fieldName:当前打开文档的字段名) → {Integer}
9、(static) getItemValueAsString(fieldName) → {String} 功能描述:获取当前打开文档中Item的值,且以double形式返回
示例:
//功能描述:获取当前打开文档中Item的值,且以Integer形式返回
//功能描述:获取当前打开文档中Item的值,且以String形式返回
(function(){
var value = getItemValueAsDouble("字段4");
return value + "";
})()
10、(static) getParentDocument() → {Document} 功能描述:返回当前打开文档的父文档对象
示例:
//当前文档的父文档对象为:toString()Document:null
(function(){
var cdoc = getParentDocument();
return "toString()" + cdoc;
})()
11、(static) getParentFlowDoc() → {Document} 功能描述:获取父流程文档
示例:
//当前文档的父流程文档对象为:toString()null
(function(){
var cdoc = getParentFlowDoc();
return "toString()" + cdoc;
})()
12、(static) getStateLabel() → {String} 功能描述:获取当前文档的状态标签
示例:
//当前文档的状态标签为:
(function(){
var statelabel= getStateLabel();
return statelabel;
})()
13、(static) getSubFlowDocList() → {Collection.} 功能描述:获取子流程文档
示例:
//当前文档的子流程文档对象集合大小为:
toString()0
(function(){
var pdoc = getSubFlowDocList();
return "toString()" + pdoc.size();
})()
14、(static) isComplete() → {Boolean} 获取当前记录是否审批完成
示例:
//当前文档记录是否审批完成:
(function(){
return isComplete();
})()
15、(static) isFirtNode() → {Boolean} 功能描述:获取当前记录是否处在第一个节点
示例:
//当前文档记录是否处在第一个节点:
(function(){
return isFirstNode();
})()
16、(static) sumSubDocument(formName, fieldName) → {Double} 功能描述:根据子文档名和字段名,获取当前打开文档的子文档中字段的值总和
示例:
//当前文档的子文档字段2值总和为:
(function(){
return ""+sumSubDocument("iscript子表单", "字段2");
})()
文档更新时间: 2023-09-16 02:16 作者:admin