如何使用 Lotusscript 列表存储集合中的表单数量?

How to use Lotusscript Lists to store number of forms in a collection?

我有一组不同形式的文档,需要在列表中存储文档形式的数量,listtag 将是形式名称和集合中该形式出现次数的值,如下所示:

主要表格 = 20

表单文档 = 10

以下代码是我正在尝试做的事情的开始,但每次出现具有现有表单的新文档时,我都需要增加元素的值

Dim frmList List As integer
Set ud = newdc.Getfirstdocument()
Do Until ud Is Nothing
            frm = ud.Form(0)
            If(IsElement(frmList(frm))) Then
                frmList(frm) =  1 ' Need to increment this value with 1 if tag exist
            Else
                frmList(frm) = 1 
            End If
            Set ud = newdc.Getnextdocument(ud)  
        Loop

如果使用 "lists" 无法做到这一点,我需要另一个解决方案

谢谢

托马斯

随便写

frmList(frm) =  frmList(frm) + 1 

frmList(frm) 为您提供表单的当前编号。只需将它加一并设置新值。