1 获取子表字段值脚本使用说明
此脚本用于流程分支脚本或人员脚本中,根据传入参数获取流程bo数据中某个子表中的某个字段的值,如果未获取到,则返回空字符串。
1.1 脚本位置
获取子表字段值脚本位置:runtime包下com.hotent.runtime.script. ScriptImpl,
脚本名称:getSubFieldValueByIndex。
全路径:com.hotent.runtime.script.ScriptImpl.getSubFieldValueByIndex。
1.2 脚本代码
1. /**
2. * 根据下标获取子表字段值
3. * @param defCode
4. * @param subTableCode
5. * @param subFieldCode
6. * @param index
7. * @return
8. * @throws Exception
9. */
10. public String getSubFieldValueByIndex(String defCode, String subTableCode, String subFieldCode, int index) throws Exception
1.3 脚本参数说明
序号 |
参数名称 |
参数类型 |
说明 |
允许为空 |
1 |
defCode |
String |
子表所属bo建模别名 |
否 |
2 |
subTableCode |
String |
子表别名 |
否 |
3 |
subFieldCode |
String |
子表字段别名 |
否 |
4 |
index |
String |
子表下标(从1开始) |
否 |
下图以bo建模示例:
1.4 使用示例
如下图所示,以该脚本在分支脚本中使用为例: