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

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

[常见问题] 获取包含元素的数据

[复制链接]
admin 发表于 2020-12-27 00:21:28 | 显示全部楼层 |阅读模式
【myApps/OBPM版本号】:4.4stable sp21
【浏览器类型】:Chrome
【技术QQ群】:182378297
【问题描述】:取包含元素的数据的脚本怎么写?

【解决方法】:
  1. (function () {
  2.     var user_name = "";
  3.     var doc = getCurrentDocument();
  4.     var childs = doc.getChilds("kf_mobilemeter");
  5.     println("childs ===" + childs);
  6.     if (childs != null && childs.size() > 0) {
  7.         for (var it = childs.iterator(); it.hasNext(); ) {
  8.             var subdoc = it.next();
  9.             user_name = subdoc.getItemValueAsString("user_name");
  10.         }
  11.     }
  12.     return user_name;
  13. })()
复制代码

本版积分规则

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

GMT+8, 2026-8-12 07:32

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

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