百数百数帮助
  • 首页
  • 帮助文档
  • 后端python
  • 开放平台
  • 私有云
  • 场景案例
  • 更新日志
返回控制台
返回控制台
  • 首页
  • Python教程
  • Python的改进
    • 应用后端对Python的改进部分
  • Python原生API
    • Python原生禁用API列表
    • Python原生内置API列表
  • Python功能列表
    • 全局(通用)
      • rnd
      • sleep
      • exit
      • synccorpmembers
      • getcorptype
      • gettickcount
      • getnstime
      • getrandomstr
      • getlasterror
      • geterror
    • io-日志(通用)
      • print
      • logclear
      • logclearall
      • logenable
      • logread
    • app-云应用(通用)
      • app.getappsymbol
      • app.getcurrentinfo
      • app.getapplist
    • form-表单(表单)
      • 表单错误信息
      • 表单字段类型
      • 查询条件和排序规则
      • 表单数据组合规则
      • 支持的SQL函数、关键字
      • 跨应用取数据说明
      • 表单系统字段说明
      • 表单操作
        • form.getallforminfo
        • form.getforminfo
        • form.getexternalforminfo
        • form.getallctrlinfo
        • form.getfileurl
        • form.transfileurl
      • 数据操作
        • form.select
        • form.aggregateselect
        • form.getdatabyid
        • form.insert
        • form.inserts
        • form.update
        • form.updates
        • form.delete
        • form.count
        • form.has
        • form.subinsert
        • form.subinserts
        • form.subupdate
        • form.subupdates
        • form.subdelete
      • 句柄操作
        • form.open
        • form.close
        • form.begin
        • form.commit
        • form.rollback
        • form.handleselect
        • form.handleinsert
        • form.handleinserts
        • form.handleupdate
        • form.handleupdates
        • form.handledelete
        • form.handlecount
        • form.handlehas
        • form.handlesubinsert
        • form.handlesubinserts
        • form.handlesubupdate
        • form.handlesubupdates
        • form.handlesubdelete
      • 通讯录
        • 用户ID说明
        • form.getcreatoruserid
        • form.getuserinfo
        • form.getdeptinfo
        • form.getparentdeptinfo
        • form.getdeptusers
        • form.getdeptlist
        • form.getdeptall
        • form.getroleusers
        • form.getoutsidergroupall
        • form.getoutsidergroupinfo
        • form.getoutsiderusers
        • form.moveusertodept
        • form.moveusertorole
        • form.moveoutsiderusers
      • 表单属性
        • form.getctrlattr
        • form.changectrlselect
        • form.getpublicinfo
        • form.getreportpublicinfo
      • 流程
        • form.getworkflowid
        • form.getworkflowdata
        • form.getworkflowlog
        • form.workflowstart
        • form.workflowstop
        • form.workflowcurrentinfo
      • 通知
        • app.geturl
        • form.getdataurl
        • form.sendmsg
      • 格式化
        • formataddress
        • formatlocation
      • 旧版数据操作
        • form.selectdata
        • form.selectdatas
        • form.insertdata
        • form.insertdatas
        • form.updatedata
        • form.updatedatas
        • form.deletedata
        • form.datacount
        • form.datahas
        • form.aggregateselectdata
        • form.subselectdata
        • form.subselectfield
        • form.subinsertdata
        • form.subinsertdatas
        • form.subupdatedata
        • form.subupdatedatas
        • form.subdeletedata
        • form.subdatacount
        • form.subdatahas
      • 旧版句柄操作
        • form.handleselectdata
        • form.handleselectdatas
        • form.handleinsertdata
        • form.handleinsertdatas
        • form.handleupdatedata
        • form.handleupdatedatas
        • form.handledeletedata
        • form.handledatacount
        • form.handledatahas
        • form.handlesubselectdata
        • form.handlesubselectfield
        • form.handlesubinsertdata
        • form.handlesubinsertdatas
        • form.handlesubupdatedata
        • form.handlesubupdatedatas
        • form.handlesubdeletedata
        • form.handlesubdatacount
        • form.handlesubdatahas
    • dataview-数据视图(数据分析)
      • 数据操作
        • dataview.select
        • dataview.count
        • dataview.has
      • 旧版数据操作
        • dataview.selectdata
        • dataview.selectdatas
        • dataview.datacount
        • dataview.datahas
    • os-日期时间(常用函数)
      • getmonthdays
      • getyeardays
      • timenow
      • timeadd
      • timediff
      • time2timestamp
      • timestamp2time
      • os.year
      • os.month
      • os.day
      • os.hour
      • os.minute
      • os.second
      • os.week
    • type-类型(常用函数)
      • tobool
      • toint
      • todouble
      • tostring
      • tonumber
      • isint
      • isdouble
      • isstring
      • isdict
      • islist
      • istuple
      • isjson
      • isdatetime
      • type
      • byte2string
      • float2hex
      • ip2integer
      • ip2integer
      • json.loads
      • json.dumps
    • string-字符串(常用函数)
      • string.lower
      • string.upper
      • string.title
      • string.cat
      • string.cut
      • string.equal
      • string.nequal
      • string.cmp
      • string.ncmp
      • string.left
      • string.right
      • string.len
      • string.find
      • string.rfind
      • string.findchar
      • string.rfindchar
      • string.reverse
      • string.sub
      • string.split
      • string.splitlines
      • string.getat
      • string.getchineseletter
      • string.format
      • string.appendchar
      • string.repeatself
      • string.shuffle
      • string.capitalize
      • string.center
      • string.count
      • string.encode
      • string.decode
      • string.startswith
      • string.endswith
      • string.expandtabs
      • string.index
      • string.rindex
      • string.join
      • string.ljust
      • string.rjust
      • string.strip
      • string.lstrip
      • string.rstrip
      • string.partition
      • string.rpartition
      • string.replace
      • string.swapcase
      • string.zfill
      • string.isalnum
      • string.isalpha
      • string.isdecimal
      • string.isnumeric
      • string.isdigit
      • string.islower
      • string.isupper
      • string.isspace
      • string.istitle
      • string.translation
      • str.maketrans
      • max
      • min
    • math-数学(常用函数)
      • math.sqrt
      • math.abs
      • math.sin
      • math.cos
      • math.tan
      • math.asin
      • math.acos
      • math.atan
      • math.atan2
      • math.sinh
      • math.asinh
      • math.cosh
      • math.acosh
      • math.tanh
      • math.atanh
      • math.pow
      • math.ln
      • math.ln1p
      • math.log
      • math.lg
      • math.exp
      • math.expm1
      • math.ceil
      • math.floor
      • math.radians
      • math.degrees
      • math.fmod
      • math.intdiv
      • math.hypot
      • math.pi
      • math.round
      • math.baseconvert
      • math.bin2dec
      • math.dec2bin
      • math.dec2hex
      • math.dec2oct
      • math.hex2dec
      • math.oct2dec
    • list-列表数组(常用函数)
      • list.max
      • list.min
      • list.move
      • list.append
      • list.extend
      • list.pop
      • list.removeforvalue
      • list.insert
      • list.sum
      • list.product
      • list.filterforvalue
      • list.sort
      • list.unique
      • list.index
      • list.count
      • list.reverse
    • tuple-元组数组(常用函数)
      • tuple.max
      • tuple.min
      • tuple.move
      • tuple.append
      • tuple.extend
      • tuple.remove
      • tuple.removeforvalue
      • tuple.insert
      • tuple.sum
      • tuple.product
      • tuple.filterforvalue
      • tuple.sort
      • tuple.unique
      • tuple.index
      • tuple.count
      • tuple.reverse
    • dict-字典数组(常用函数)
      • dict.clear
      • dict.max
      • dict.min
      • dict.push
      • dict.cat
      • dict.copy
      • dict.fromkeys
      • dict.get
      • dict.items
      • dict.keys
      • dict.values
      • dict.move
      • dict.remove
      • dict.removeforvalue
      • dict.pop
      • dict.popitem
      • dict.setdefault
      • dict.update
      • dict.sum
      • dict.product
      • dict.filterforkey
      • dict.filterforvalue
      • dict.sort
      • dict.unique
    • set-集合数组(常用函数)
      • set.add
      • set.update
      • set.clear
      • set.copy
      • set.isdisjoint
      • set.issubset
      • set.issuperset
      • set.discard
      • set.remove
      • set.pop
      • set.difference
      • set.difference_update
      • set.intersection
      • set.intersection_update
      • set.union
      • set.symmetric_difference
      • set.symmetric_difference_update
    • regular-正则(函数)
      • re.compile
      • re.match
      • re.sub
      • re.search
      • re.finditer
      • re.split
      • re.matchemail
      • re.matchphone
      • re.matchtelephone
      • re.matchurl
      • re.matchip
      • re.matchidcard
      • re.matchqq
      • re.matchzipcode
      • re.matchnumber
      • re.matchchinese
      • re.matchtext
      • re.submatchtext
      • re.replace
      • re.subreplace
    • hash-哈希(函数)
      • md5
      • sha1
      • sha1hmac
      • sha1hmac_binary_base64
      • sha224
      • sha256
      • sha384
      • sha512
      • ripemd160
    • crypt-加密(函数)
      • base64encode
      • base64decode
      • urlencode
      • urldecode
      • gmssl
    • numpy-数值计算(函数)
      • Numpy介绍
    • curl(网络通讯)
      • curl.init
      • curl.setopt
      • curl.exec
      • curl.close
      • curl.getinfo
      • curl.escape
      • curl.unescape
      • curl.iconv
    • requests(网络通讯)
      • requests.request
      • requests.get
      • requests.post
      • requests.options
      • requests.head
      • requests.put
      • requests.patch
      • requests.delete
    • httpex(网络通讯)
      • httpex.get
      • httpex.request
      • httpex.getfileurlbase64
      • httpex.getcookies
      • httpex.updatecookies
    • websocket(网络通讯)
      • websocket.request
      • websocket.open
      • websocket.send
      • websocket.close
    • mysql(数据库)
      • mysql.open
      • mysql.close
      • mysql.exec
      • mysql.query
      • mysql.begin
      • mysql.commit
      • mysql.rollback
      • mysql.getlasteffectrecords
      • mysqlexec
      • mysqlquerybylist
      • mysqlquerybyjson
    • sqlserver(数据库)
      • sqlserver.open
      • sqlserver.close
      • sqlserver.exec
      • sqlserver.query
      • sqlserver.begin
      • sqlserver.commit
      • sqlserver.rollback
      • sqlserver.getlasteffectrecords
      • sqlserverexec
      • sqlserverquerybylist
      • sqlserverquerybyjson
    • redis(数据库)
      • redis.open
      • redis.close
      • redis.exec
      • redis.query
      • redis.set
      • redis.get
  • Python后端事件
    • _forminitial(表单初始化事件)
    • _formeditinitial(表单编辑初始化事件)
    • _flownodeinitial(流程节点初始化事件)
    • _formevent(控件触发事件)
    • _formsubmit(表单提交事件)
    • _formupdate(表单编辑事件)
    • _formdelete(表单数据删除事件)
    • _formflow(表单流程事件)
    • _datahelper(数据助手事件)
  • Python功能插件
    • 功能插件设计
    • 插件控件
      • 基础控件
      • 表单来源
        • 表单来源Config参数说明
        • 表单来源设计面板说明
      • 子表单
        • 子表单Config参数说明
        • 子表单设计面板说明
      • 字段
        • 字段Config参数说明
        • 字段设计面板说明
      • 关联字段
        • 关联字段Config参数说明
        • 关联字段面板说明
      • 过滤条件
        • 过滤条件Config参数说明
        • 过滤条件面板说明
        • 过滤条件操作符说明
    • 插件事件
      • _forminitiallib(表单初始化事件)
      • _formeditinitiallib(表单编辑初始化事件)
      • _flownodeinitiallib(流程节点初始化事件)
      • _formeventlib(表单控件触发事件)
      • _formsubmitlib(表单数据提交事件)
      • _formupdatelib(表单数据编辑事件)
      • _formdeletelib(表单数据删除事件)
      • _formflowlib(流程节点事件)
      • _formconfiglib(插件配置事件)
      • _formtasklib(计划任务事件)
      • _reporttablemenulib(报表数据表菜单按钮事件)
      • _datahelperlib(数据助手事件)
  • API限制说明
  • Lua后端停止服务通知

字段Config参数说明

  • 字段Config参数说明
    • 数据格式
    • 参数说明
    • 调用例子

数据格式

# 下面为字段传入Config参数的详细内容
{
    #字段字段的别名
    "字段":{
        "type":"field",                                                 #当前字段的类型
        "form":"58a8d3f5e6efa834894a29dd",       #数据源表单别名
         #字段字段的详细内容data内部为一个索引数组,每个元素代表我们所选择的一项内容
        "data":[
            #单行文本字段
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"单行文本的别名",                       #字段的别名
                "type":"text",                                       #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #多行文本字段
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"多行文本的别名",                       #字段的别名
                "type":"textarea",                                      #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #数字字段
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"数字字段的别名",                       #字段的别名
                "type":"number",                                    #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #日期时间字段
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"日期时间字段的别名",             #字段的别名
                "type":"datetime",                                  #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #单选按钮组
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"单选按钮组的别名",                  #字段的别名
                "type":"radiogroup",                                #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",        #字段所在表单的表单别名
                "items":{                                                   #选项列表
                    {
                        "value":"选项1",
                        "text":"选项1"
                    },
                    {
                        "value":"选项2",
                        "text":"选项2"
                    },
                    {
                        "value":"选项3",
                        "text":"选项3"
                    }
                }
            },
            #多选按钮组
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"多选按钮组的别名",                  #字段的别名
                "type":"checkboxgroup",                     #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",        #字段所在表单的表单别名
                "items":{                                                   #选项列表
                    {
                        "value":"选项1",
                        "text":"选项1"
                    },
                    {
                        "value":"选项2",
                        "text":"选项2"
                    },
                    {
                        "value":"选项3",
                        "text":"选项3"
                    }
                }
            },
            #下拉框
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"下拉框的别名",                            #字段的别名
                "type":"combo",                                     #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",        #字段所在表单的表单别名
                "items":{                                                   #下拉框选项列表
                    {
                        "value":"选项1",
                        "text":"选项1"
                    },
                    {
                    "value":"选项2",
                        "text":"选项2"
                    },
                    {
                        "value":"选项3",
                        "text":"选项3"
                    }
                }
            },
            #下拉复选框
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"下拉复选框的别名",                  #字段的别名
                "type":"combocheck",                            #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",        #字段所在表单的表单别名
                "items":{                                                   #下拉复选框选项列表
                    {
                        "value":"选项1",
                        "text":"选项1"
                    },
                    {
                        "value":"选项2",
                        "text":"选项2"
                    },
                    {
                        "value":"选项3",
                        "text":"选项3"
                    }
                }
            },
            #图片
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"图片的别名",                             #字段的别名
                "type":"image",                                     #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #附件
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"附件的别名",                             #字段的别名
                "type":"upload",                                        #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #成员单选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"成员单选的别名",                       #字段的别名
                "type":"user",                                          #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #成员多选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"成员多选的别名",                       #字段的别名
                "type":"usergroup",                                 #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #部门单选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"部门单选的别名",                       #字段的别名
                "type":"dept",                                          #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #部门多选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"部门多选的别名",                       #字段的别名
                "type":"deptgroup",                             #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单的别名",                        #字段的别名
                "type":"subform",                                   #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的单行文本
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的单行文本的别名",      #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名    
                "type":"text",                                          #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的多行文本
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的多行文本的别名",      #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"textarea",                                  #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的数字字段
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的数字字段的别名",      #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"number",                                    #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的日期时间字段
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的日期时间字段的别名",        #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"datetime",                              #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的单选按钮组
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的单选按钮组的别名",     #字段的别名
                "subform":"子表单的别名",                         #当前字段所在子表单别名
                "type":"radiogroup",                                #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",            #字段所在表单的表单别名
                "items":[                                                       #选项列表
                    {
                        "text":"选项1",
                        "value":"选项1"
                    },
                    {
                        "text":"选项2",
                        "value":"选项2"
                    },
                    {
                        "text":"选项3",
                        "value":"选项3"
                    }
                ]
            },
            #子表单内的复选框组
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的复选框组的别名",      #字段的别名
                "subform":"子表单的别名", #当前字段所在子表单别名
                "type":"checkboxgroup",                         #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",            #字段所在表单的表单别名
                "items":[                                                     #选项列表
                    {
                        "text":"选项1",
                        "value":"选项1"
                    },
                    {
                        "text":"选项2",
                        "value":"选项2"
                    },
                    {
                        "text":"选项3",
                        "value":"选项3"
                    }
                ]
            },
            #子表单内的下拉框
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的下拉框的别名",       #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"combo",                                         #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",            #字段所在表单的表单别名
                "items":[                                                      #选项列表
                    {
                        "text":"选项1",
                        "value":"选项1"
                    },
                    {
                        "text":"选项2",
                        "value":"选项2"
                    },
                    {
                        "text":"选项3",
                        "value":"选项3"
                    }
                ]
            },
            #子表单内的下拉复选框
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的下拉复选框的别名",     #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"combocheck",                            #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd",        #字段所在表单的表单别名
                "items":[                                                #选项列表
                    {
                        "text":"选项1",
                        "value":"选项1"
                    },
                    {
                        "text":"选项2",
                        "value":"选项2"
                    },
                    {
                        "text":"选项3",
                        "value":"选项3"
                    }
                ]
            },
            #子表单内的图片
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的图片的别名",                #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"image",                                         #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"         #字段所在表单的表单别名
            },
            #子表单内的附件
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的附件的别名",        #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"upload",                                    #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的成员单选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的成员单选的别名",      #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"user",                                      #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的成员多选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的成员多选的别名",      #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"usergroup",                                 #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的部门单选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的部门单选的别名",      #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"dept",                                      #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #子表单内的部门多选
            {
                "comment":"字段注解内容",                 #字段注解内容(需要在字段属性中开启注解功能并设置)
                "name":"子表单内的部门多选的别名",      #字段的别名
                "subform":"子表单的别名",                     #当前字段所在子表单别名
                "type":"deptgroup",                                 #当前字段的类型
                "id":"58a8d3f5e6efa834894a29dd"     #字段所在表单的表单别名
            },
            #当前数据提交人
            {
                "name":"creator",                                   
                "type":"user",                                                      "id":"58a8d3f5e6efa834894a29dd"     #所在表单的表单别名
            },
            #提交时间
            {
                "name":"createTime",                                
                "type":"datetime",                                  
                "id":"58a8d3f5e6efa834894a29dd"     #所在表单的表单别名
            },
            #更新时间
            {
                "name":"updateTime",
                "type":"datetime",
                "id":"58a8d3f5e6efa834894a29dd"     #所在表单的表单别名
            }
        ]
    }
}

参数说明

名称 说明
type 字段类型(field表示字段)
form 数据源表单别名(如果是跨表单则格式为:appid@表单别名)
data 字段的配置信息
data.name 字段的别名
data.type 字段类型
data.id 字段所在的表单别名
data.comment 字段的注释(需要在字段属性中开启注解功能并设置)

备注:"动态字段格式" 与 "固定字段格式" 的区别为 "动态字段格式" 可以选定多个字段进行配置,"固定字段格式" 只能选定固定个字段进行配置

调用例子

def _formsubmitlib(config,formAlias,arg,type):
    #获取字段数据源表单别名
    fieldalias=config["字段"]["form"]
    #获取字段数量
    size=len(config["字段"]["data"])
    #单独获取某个字段的信息
    #获取上述例子中单行文本内容
    text=config["字段"]["data"][1]["name"]
    #字段字段在模块中会将所有的字段信息以“索引数组”的方式进行返回,下面以个别字段信息获取为例,其他字段信息获取方式相同
    #获取上述例子中单行文本所在表单别名
    textalias=config["字段"]["data"][1]["id"]
    #获取上述例子中子表单别名
    childsize=table.size(config["字段"]["data"][15]["name"])
    #获取上述例子中子表单内单行文本的字段别名
    childtext=config["字段"]["data"][15]["name"]
    #获取上述例子中子表单内单行文本的所在子表单别名
    childtext=config["字段"]["data"][15]["subform"]
    #遍历获取所有字段信息
    for i in range(0,size):
        #输出字段别名到调试信息
        print(config["字段"]["data"][i]["name"])
        #输出字段类型到调试信息
        print(config["字段"]["data"][i]["type"])
        #判断是否子表单字段,并输出子表单别名到调试信息
        if(config["字段"]["data"][i].has_key("subform")):
            print(config["字段"]["data"][i]["subform"])
最新修改于:2021-10-15