|
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的值为:
null
(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形式返回
字段4:
请输入内容
获取字段4的double值为:
0
获取字段4的int值为:
0
获取字段4的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");
})() |
|