天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 1897|回复: 0

当前文档CURDOC

[复制链接]
admin 发表于 2023-9-15 16:15:49 | 显示全部楼层 |阅读模式
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}        功能描述:&#65279;根据子文档名,获取当前文档的子文档个数
示例:
子表共有(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}
示例:

&#65279;功能描述:获取当前打开文档的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.<Document>}        功能描述:获取子流程文档
示例:
当前文档的子流程文档对象集合大小为:
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");
})()

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 05:40

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表